[QGIS Commit] r10165 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Feb 13 13:20:56 EST 2009


Author: mhugent
Date: 2009-02-13 13:20:55 -0500 (Fri, 13 Feb 2009)
New Revision: 10165

Modified:
   trunk/qgis/src/app/qgisapp.cpp
Log:
Show warning before deleting features

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2009-02-13 17:50:26 UTC (rev 10164)
+++ trunk/qgis/src/app/qgisapp.cpp	2009-02-13 18:20:55 UTC (rev 10165)
@@ -3749,6 +3749,14 @@
     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" ),



More information about the QGIS-commit mailing list