From 60688ecf5bc6e44795472cb22888ec5994a904a8 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Wed, 18 Nov 2020 02:13:25 -0600 Subject: Ignore ALT-key event when ui is locked --- src/mainwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e78f5dd..2bb0a237 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -6495,10 +6495,12 @@ void MainWindow::dropEvent(QDropEvent *event) void MainWindow::keyReleaseEvent(QKeyEvent *event) { - // if the menubar is hidden, pressing Alt will make it visible - if (event->key() == Qt::Key_Alt) { - if (!ui->menuBar->isVisible()) { - ui->menuBar->show(); + if (!UILocker::instance().locked()) { + // if the menubar is hidden, pressing Alt will make it visible + if (event->key() == Qt::Key_Alt) { + if (!ui->menuBar->isVisible()) { + ui->menuBar->show(); + } } } -- cgit v1.3.1