Skip to content

Commit

Permalink
fix addpart tool warning
Browse files Browse the repository at this point in the history
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 5168d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdpart.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5168d7d

Please sign in to comment.