0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05: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:
furszy 2023-10-13 17:27:24 -03:00
parent 7066e8996d
commit 8b6470a906
No known key found for this signature in database
GPG key ID: 5DD23CCC686AA623

View file

@ -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();
}
}