aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-10-13 17:27:24 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-10-13 17:40:32 -0300
commit8b6470a90652fcffc45b8d7998af7c8ad6251332 (patch)
tree280a036208050a759a7db8c59e9a912f4571ea1a
parent7066e8996d0ac090535cc97cdcb54a219986460f (diff)
downloadbitcoin-8b6470a90652fcffc45b8d7998af7c8ad6251332.tar.xz
gui: disable top bar menu actions during shutdown
Opening the top bar menu when the app is being destroyed freezes the GUI shutdown process for no reason. No menu action can be executed. Note: This behavior is consistent with how the tray icon menu is cleared too.
-rw-r--r--src/qt/bitcoingui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 96cc5a3bf0..720f5584d6 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -650,7 +650,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
m_mask_values_action->setChecked(_clientModel->getOptionsModel()->getOption(OptionsModel::OptionID::MaskValues).toBool());
} else {
- if(trayIconMenu)
+ // Shutdown requested, disable menus
+ if (trayIconMenu)
{
// Disable context menu on tray icon
trayIconMenu->clear();
@@ -664,6 +665,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(nullptr);
+ // Disable top bar menu actions
+ appMenuBar->clear();
}
}