Skip to content
Permalink
Browse files

fix addpart tool warning

The isGeometryEmpty variable was true when geometry was present and viceversa.
Thus the warning for multiple parts for single geometry was giving false positives and
negatives.
  • Loading branch information
tudorbarascu committed Oct 20, 2018
1 parent dcd3318 commit 5168d7d98bf99fcbb57dc997f1aca56837a9caf9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgsmaptooladdpart.cpp
@@ -71,7 +71,7 @@ void QgsMapToolAddPart::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
QgsFeatureIterator selectedFeatures = vlayer->getSelectedFeatures();
QgsFeature firstSelectedFeature;
if ( selectedFeatures.nextFeature( firstSelectedFeature ) )
if ( !firstSelectedFeature.geometry().isNull() )
if ( firstSelectedFeature.geometry().isNull() )
isGeometryEmpty = true;
}

0 comments on commit 5168d7d

Please sign in to comment.
You can’t perform that action at this time.