Skip to content

Commit

Permalink
Ignore remove legend entries dialog with shift help
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Mar 29, 2016
1 parent 631a7fd commit d732d84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -7746,8 +7746,9 @@ void QgisApp::removeLayer()
}

bool promptConfirmation = QSettings().value( "qgis/askToDeleteLayers", true ).toBool();
bool shiftHeld = QApplication::queryKeyboardModifiers().testFlag(Qt::ShiftModifier);
//display a warning
if ( promptConfirmation && QMessageBox::warning( this, tr( "Remove layers and groups" ), tr( "Remove %n legend entries?", "number of legend items to remove", selectedNodes.count() ), QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
if ( !shiftHeld && promptConfirmation && QMessageBox::warning( this, tr( "Remove layers and groups" ), tr( "Remove %n legend entries?", "number of legend items to remove", selectedNodes.count() ), QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
{
return;
}
Expand Down

0 comments on commit d732d84

Please sign in to comment.