Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Feb 13, 2009
1 parent 8bc69ee commit 8dddd5c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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" ),
Expand Down

0 comments on commit 8dddd5c

Please sign in to comment.