Skip to content

Commit

Permalink
Show warning before deleting features
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10165 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 13, 2009
1 parent 537a9fa commit 96182a0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
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 96182a0

Please sign in to comment.