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,23 +376,21 @@ void checkDock::runTests( ValidateType type )
|
||||
for ( it = errors.begin(); it != errors.end(); ++it )
|
||||
{
|
||||
TopolError *te = *it;
|
||||
te->conflict();
|
||||
|
||||
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 );
|
||||
}
|
||||
else
|
||||
{
|
||||
rb = new QgsRubberBand( qgsInterface->mapCanvas(), te->conflict().type() );
|
||||
}
|
||||
rb = new QgsRubberBand( qgsInterface->mapCanvas(), g.type() );
|
||||
rb->setColor( "red" );
|
||||
rb->setWidth( 4 );
|
||||
rb->setToGeometry( te->conflict(), layer1 );
|
||||
rb->setToGeometry( g, layer1 );
|
||||
rb->show();
|
||||
mRbErrorMarkers << rb;
|
||||
}
|
||||
}
|
||||
mErrorList << errors;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user