Skip to content

Commit d732d84

Browse files
committed
Ignore remove legend entries dialog with shift help
1 parent 631a7fd commit d732d84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/qgisapp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7746,8 +7746,9 @@ void QgisApp::removeLayer()
77467746
}
77477747

77487748
bool promptConfirmation = QSettings().value( "qgis/askToDeleteLayers", true ).toBool();
7749+
bool shiftHeld = QApplication::queryKeyboardModifiers().testFlag(Qt::ShiftModifier);
77497750
//display a warning
7750-
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 )
7751+
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 )
77517752
{
77527753
return;
77537754
}

0 commit comments

Comments
 (0)