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:
parent
7066e8996d
commit
8b6470a906
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue