mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[Geometry checker] Fix crashes in QgsGeometryGapCheck::mergeWithNeighbor due to using wrong layerId
This commit is contained in:
parent
4a6cdbe36b
commit
edf563b414
@ -156,7 +156,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError *err, Chan
|
||||
// Search for touching neighboring geometries
|
||||
for ( const QString &layerId : err->neighbors().keys() )
|
||||
{
|
||||
QgsFeaturePool *featurePool = mContext->featurePools[ err->layerId() ];
|
||||
QgsFeaturePool *featurePool = mContext->featurePools[ layerId ];
|
||||
QgsAbstractGeometry *errLayerGeom = errGeometry->clone();
|
||||
errLayerGeom->transform( featurePool->getLayerToMapTransform(), QgsCoordinateTransform::ReverseTransform );
|
||||
|
||||
@ -205,7 +205,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError *err, Chan
|
||||
}
|
||||
|
||||
// Add merged polygon to destination geometry
|
||||
replaceFeatureGeometryPart( err->layerId(), mergeFeature, mergePartIdx, combinedGeom, changes );
|
||||
replaceFeatureGeometryPart( mergeLayerId, mergeFeature, mergePartIdx, combinedGeom, changes );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user