Skip to content

Commit 8b6470a

Browse files
committed
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.
1 parent 7066e89 commit 8b6470a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/qt/bitcoingui.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
650650

651651
m_mask_values_action->setChecked(_clientModel->getOptionsModel()->getOption(OptionsModel::OptionID::MaskValues).toBool());
652652
} else {
653-
if(trayIconMenu)
653+
// Shutdown requested, disable menus
654+
if (trayIconMenu)
654655
{
655656
// Disable context menu on tray icon
656657
trayIconMenu->clear();
@@ -664,6 +665,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
664665
}
665666
#endif // ENABLE_WALLET
666667
unitDisplayControl->setOptionsModel(nullptr);
668+
// Disable top bar menu actions
669+
appMenuBar->clear();
667670
}
668671
}
669672

0 commit comments

Comments
 (0)