mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Show warning before deleting features
git-svn-id: http://svn.osgeo.org/qgis/trunk@10165 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
537a9fafc5
commit
96182a0440
@ -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" ),
|
||||
|
Loading…
x
Reference in New Issue
Block a user