mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Fixes #52903 : Fix topology checker results display with geometry collection
This commit is contained in:
parent
b6a9119c76
commit
e5db747409
@ -376,22 +376,20 @@ void checkDock::runTests( ValidateType type )
|
|||||||
for ( it = errors.begin(); it != errors.end(); ++it )
|
for ( it = errors.begin(); it != errors.end(); ++it )
|
||||||
{
|
{
|
||||||
TopolError *te = *it;
|
TopolError *te = *it;
|
||||||
te->conflict();
|
|
||||||
|
|
||||||
const QgsSettings settings;
|
const QgsSettings settings;
|
||||||
if ( te->conflict().type() == Qgis::GeometryType::Polygon )
|
const QgsGeometry geom = te->conflict();
|
||||||
|
QVector<QgsGeometry> geoms = ( geom.wkbType() == Qgis::WkbType::GeometryCollection ?
|
||||||
|
geom.asGeometryCollection() : QVector<QgsGeometry>() << geom );
|
||||||
|
|
||||||
|
for ( const QgsGeometry &g : std::as_const( geoms ) )
|
||||||
{
|
{
|
||||||
rb = new QgsRubberBand( qgsInterface->mapCanvas(), Qgis::GeometryType::Polygon );
|
rb = new QgsRubberBand( qgsInterface->mapCanvas(), g.type() );
|
||||||
|
rb->setColor( "red" );
|
||||||
|
rb->setWidth( 4 );
|
||||||
|
rb->setToGeometry( g, layer1 );
|
||||||
|
rb->show();
|
||||||
|
mRbErrorMarkers << rb;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
rb = new QgsRubberBand( qgsInterface->mapCanvas(), te->conflict().type() );
|
|
||||||
}
|
|
||||||
rb->setColor( "red" );
|
|
||||||
rb->setWidth( 4 );
|
|
||||||
rb->setToGeometry( te->conflict(), layer1 );
|
|
||||||
rb->show();
|
|
||||||
mRbErrorMarkers << rb;
|
|
||||||
}
|
}
|
||||||
mErrorList << errors;
|
mErrorList << errors;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user