@@ -92,11 +92,11 @@ void QgsGeometryOverlapCheck::fixError( const QMap<QString, QgsFeaturePool *> &f
92
92
QgsGeometryOverlapCheckError *overlapError = static_cast <QgsGeometryOverlapCheckError *>( error );
93
93
94
94
QgsFeaturePool *featurePoolA = featurePools[ overlapError->layerId () ];
95
- QgsFeaturePool *featurePoolB = featurePools[ overlapError->overlappedFeature ().first ];
95
+ QgsFeaturePool *featurePoolB = featurePools[ overlapError->overlappedFeature ().layerId () ];
96
96
QgsFeature featureA;
97
97
QgsFeature featureB;
98
98
if ( !featurePoolA->getFeature ( overlapError->featureId (), featureA ) ||
99
- !featurePoolB->getFeature ( overlapError->overlappedFeature ().second , featureB ) )
99
+ !featurePoolB->getFeature ( overlapError->overlappedFeature ().featureId () , featureB ) )
100
100
{
101
101
error->setObsolete ();
102
102
return ;
@@ -186,7 +186,7 @@ void QgsGeometryOverlapCheck::fixError( const QMap<QString, QgsFeaturePool *> &f
186
186
diff2->transform ( ct, QgsCoordinateTransform::ReverseTransform );
187
187
featureB.setGeometry ( QgsGeometry ( std::move ( diff2 ) ) );
188
188
189
- changes[overlapError->overlappedFeature ().first ][featureB.id ()].append ( Change ( ChangeFeature, ChangeChanged ) );
189
+ changes[overlapError->overlappedFeature ().layerId () ][featureB.id ()].append ( Change ( ChangeFeature, ChangeChanged ) );
190
190
featurePoolB->updateFeature ( featureB );
191
191
}
192
192
@@ -249,15 +249,14 @@ bool QgsGeometryOverlapCheck::factoryIsCompatible( QgsVectorLayer *layer ) SIP_S
249
249
250
250
QgsGeometryOverlapCheckError::QgsGeometryOverlapCheckError ( const QgsGeometryCheck *check, const QgsGeometryCheckerUtils::LayerFeature &layerFeature, const QgsGeometry &geometry, const QgsPointXY &errorLocation, const QVariant &value, const QgsGeometryCheckerUtils::LayerFeature &overlappedFeature )
251
251
: QgsGeometryCheckError( check, layerFeature.layer()->id(), layerFeature.feature().id(), geometry, errorLocation, QgsVertexId(), value, ValueArea )
252
- , mOverlappedFeature( qMakePair( overlappedFeature.layer()->id(), overlappedFeature.feature().id() ) )
253
-
252
+ , mOverlappedFeature( OverLappedFeature( overlappedFeature.layer(), overlappedFeature.feature().id() ) )
254
253
{
255
254
256
255
}
257
256
258
257
QString QgsGeometryOverlapCheckError::description () const
259
258
{
260
- return QCoreApplication::translate ( " QgsGeometryTypeCheckError" , " Overlap with %1: %2" ).arg ( mOverlappedFeature .first , QString::number ( mOverlappedFeature .second ) );
259
+ return QCoreApplication::translate ( " QgsGeometryTypeCheckError" , " Overlap with %1 at feature %2" ).arg ( mOverlappedFeature .layerName () , QString::number ( mOverlappedFeature .featureId () ) );
261
260
}
262
261
263
262
QgsGeometryCheck::CheckType QgsGeometryOverlapCheck::factoryCheckType ()
0 commit comments