From 8e13c98c5eff4d570f3ba42dc16ed5ac7295c7fd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 19 May 2025 22:29:22 -0400 Subject: [PATCH] Fix focus returning to the search bar after project reload --- src/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f612dd78..a0b9012b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -138,6 +138,13 @@ void MainWindow::setWindowDisabled(bool disabled) { ui->actionCheck_for_Updates->setDisabled(false); if (!disabled) togglePreferenceSpecificUi(); + + // Disabling the central widget above sets focus to the map list's search bar, + // which prevents users from using keyboard shortcuts for menu actions. + // Rather than explicitly set the tab order to give focus to something else + // (which is a bit of a pain to set up and maintain) we just make sure focus + // is on something that (mostly) ignores the keyboard. + ui->graphicsView_Map->setFocus(); } void MainWindow::initWindow() {