File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ void QgsMapToolAddPart::cadCanvasReleaseEvent( QgsMapMouseEvent * e )
65
65
return ;
66
66
}
67
67
68
+ bool isGeometryEmpty = false ;
69
+ if ( vlayer->selectedFeatures ()[0 ].geometry ().isEmpty () )
70
+ isGeometryEmpty = true ;
71
+
68
72
if ( !checkSelection () )
69
73
{
70
74
stopCapturing ();
@@ -194,6 +198,12 @@ void QgsMapToolAddPart::cadCanvasReleaseEvent( QgsMapMouseEvent * e )
194
198
vlayer->endEditCommand ();
195
199
196
200
vlayer->triggerRepaint ();
201
+
202
+ if (( !isGeometryEmpty ) && QgsWkbTypes::isSingleType ( vlayer->wkbType () ) )
203
+ {
204
+ emit messageEmitted ( tr ( " Add part: Feature geom is single part and you've added more than one" ), QgsMessageBar::WARNING );
205
+ }
206
+
197
207
return ;
198
208
}
199
209
You can’t perform that action at this time.
0 commit comments