Skip to content

Commit

Permalink
delete line with < 2 vertices
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5412 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 3, 2006
1 parent ab56c02 commit 7c856a9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/plugins/grass/qgsgrassedittools.cpp
Expand Up @@ -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();

Expand Down

0 comments on commit 7c856a9

Please sign in to comment.