Skip to content

Commit 0f9a08e

Browse files
committed
Allow delete part tool to remove geometry from single type point
and line layers (fix #13258)
1 parent 45d6c04 commit 0f9a08e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/qgsmaptooldeletepart.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ QgsGeometry* QgsMapToolDeletePart::partUnderPoint( QPoint point, QgsFeatureId& f
134134
vlayer->getFeatures( QgsFeatureRequest().setFilterFid( match.featureId() ) ).nextFeature( f );
135135
const QgsGeometry* g = f.constGeometry();
136136
if ( !g->isMultipart() )
137-
return geomPart;
137+
{
138+
fid = match.featureId();
139+
delete geomPart;
140+
return QgsGeometry::fromPoint( match.point() );
141+
}
138142
if ( g->wkbType() == QGis::WKBMultiPoint || g->wkbType() == QGis::WKBMultiPoint25D )
139143
{
140144
fid = match.featureId();

0 commit comments

Comments
 (0)