Merge pull request #1750 from AenBleidd/Issue1748

MGR: Enable always 'Advance View' menu item in Simple mode.
This commit is contained in:
David Anderson 2017-01-05 14:40:43 -08:00 committed by GitHub
commit 93b9f8fefb
1 changed files with 4 additions and 2 deletions

View File

@ -390,6 +390,7 @@ void CSimpleFrame::OnMenuOpening( wxMenuEvent &event) {
CMainDocument* pDoc = wxGetApp().GetDocument();
wxMenu* menuFile = NULL;
wxMenu* menuHelp = NULL;
wxMenu* menuChangeGUI = NULL;
wxASSERT(pDoc);
@ -398,13 +399,14 @@ void CSimpleFrame::OnMenuOpening( wxMenuEvent &event) {
menu->FindItem(ID_CLOSEWINDOW, &menuFile);
menu->FindItem(ID_HELPBOINC, &menuHelp);
menu->FindItem(ID_CHANGEGUI, &menuChangeGUI);
size_t numItems = menu->GetMenuItemCount();
for (size_t pos = 0; pos < numItems; ++pos) {
wxMenuItem * item = menu->FindItemByPosition(pos);
if ((menu == menuFile) || (menu == menuHelp)) {
if ((menu == menuFile) || (menu == menuHelp) || (menu == menuChangeGUI)) {
// Always enable all items in File menu or Help menu:
// ID_CLOSEWINDOW, wxID_EXIT, ID_HELPBOINC, ID_HELPBOINCMANAGER,
// ID_HELPBOINCWEBSITE, wxID_ABOUT
// ID_HELPBOINCWEBSITE, wxID_ABOUT, ID_CHANGEGUI
item->Enable(true);
} else {
// Disable other menu items if not connected to client