Skip to content

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed
 

‎src/plugins/grass/qgsgrassedittools.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,20 @@ void QgsGrassEditDeleteVertex::mouseClick(QgsPoint & point, Qt::ButtonState butt
463463
int type = e->mProvider->readLine ( e->mPoints, e->mCats, e->mSelectedLine );
464464
Vect_line_delete_point ( e->mPoints, e->mSelectedPart );
465465

466-
e->mProvider->rewriteLine ( e->mSelectedLine, type, e->mPoints, e->mCats );
466+
if ( e->mPoints->n_points < 2 ) // delete line
467+
{
468+
e->mProvider->deleteLine ( e->mSelectedLine );
469+
470+
// Check orphan records
471+
for ( int i = 0 ; i < e->mCats->n_cats; i++ ) {
472+
e->checkOrphan ( e->mCats->field[i], e->mCats->cat[i] );
473+
}
474+
}
475+
else
476+
{
477+
e->mProvider->rewriteLine ( e->mSelectedLine, type, e->mPoints, e->mCats );
478+
}
479+
467480
e->updateSymb();
468481
e->displayUpdated();
469482

0 commit comments

Comments
 (0)
Please sign in to comment.