Skip to content

Commit 09c0c71

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 8b31c03 commit 09c0c71

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
@@ -658,7 +658,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
658658

659659
m_mask_values_action->setChecked(_clientModel->getOptionsModel()->getOption(OptionsModel::OptionID::MaskValues).toBool());
660660
} else {
661-
if(trayIconMenu)
661+
// Shutdown requested, disable menus
662+
if (trayIconMenu)
662663
{
663664
// Disable context menu on tray icon
664665
trayIconMenu->clear();
@@ -672,6 +673,8 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
672673
}
673674
#endif // ENABLE_WALLET
674675
unitDisplayControl->setOptionsModel(nullptr);
676+
// Disable top bar menu actions
677+
appMenuBar->clear();
675678
}
676679
}
677680

0 commit comments

Comments
 (0)