Skip to content
Permalink
Browse files
delete line with < 2 vertices
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5412 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 3, 2006
1 parent 2aa7bfb commit 1720f9f95ade3eb2cc26d8c0c5f43aa8cc8140eb
Showing with 14 additions and 1 deletion.
  1. +14 −1 src/plugins/grass/qgsgrassedittools.cpp
@@ -463,7 +463,20 @@ void QgsGrassEditDeleteVertex::mouseClick(QgsPoint & point, Qt::ButtonState butt
int type = e->mProvider->readLine ( e->mPoints, e->mCats, e->mSelectedLine );
Vect_line_delete_point ( e->mPoints, e->mSelectedPart );

e->mProvider->rewriteLine ( e->mSelectedLine, type, e->mPoints, e->mCats );
if ( e->mPoints->n_points < 2 ) // delete line
{
e->mProvider->deleteLine ( e->mSelectedLine );

// Check orphan records
for ( int i = 0 ; i < e->mCats->n_cats; i++ ) {
e->checkOrphan ( e->mCats->field[i], e->mCats->cat[i] );
}
}
else
{
e->mProvider->rewriteLine ( e->mSelectedLine, type, e->mPoints, e->mCats );
}

e->updateSymb();
e->displayUpdated();

0 comments on commit 1720f9f

Please sign in to comment.