Skip to content
Permalink
Browse files

Show warning before deleting features

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10165 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Feb 13, 2009
1 parent 8bc69ee commit 8dddd5c81c3ab66629b3da2face0e692a7636e9f
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/app/qgisapp.cpp
@@ -3749,6 +3749,14 @@ void QgisApp::deleteSelected()
return;
}

//display a warning
int numberOfDeletedFeatures = vlayer->selectedFeaturesIds().size();
if(QMessageBox::warning(this, tr("Delete features"), tr("Delete %1 feature(s)?").arg(numberOfDeletedFeatures), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
{
return;
}


if ( !vlayer->deleteSelectedFeatures() )
{
QMessageBox::information( this, tr( "Problem deleting features" ),

0 comments on commit 8dddd5c

Please sign in to comment.