mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 05:34:57 +01:00
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.
This commit is contained in:
@@ -650,6 +650,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
|
||||
|
||||
m_mask_values_action->setChecked(_clientModel->getOptionsModel()->getOption(OptionsModel::OptionID::MaskValues).toBool());
|
||||
} else {
|
||||
// Shutdown requested, disable menus
|
||||
if (trayIconMenu)
|
||||
{
|
||||
// Disable context menu on tray icon
|
||||
@@ -664,6 +665,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
unitDisplayControl->setOptionsModel(nullptr);
|
||||
// Disable top bar menu actions
|
||||
appMenuBar->clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user