Skip to content

Commit 1925696

Browse files
committed
Disable View->Strategic game if game is in strategic form
On a strategic game the View->Strategic game menu option was (a) available and (b) unchecked. Selecting it would result in program termination. This corrects the situation: It is now (a) disabled but (b) checked.
1 parent 32367e4 commit 1925696

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gui/gameframe.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ void gbtGameFrame::MakeMenus()
489489

490490
viewMenu->Append(GBT_MENU_VIEW_STRATEGIC, _("&Strategic game"),
491491
wxT("Display the reduced strategic representation ") wxT("of the game"), true);
492+
if (!m_doc->GetGame()->IsTree()) {
493+
viewMenu->Check(GBT_MENU_VIEW_STRATEGIC, true);
494+
viewMenu->Enable(GBT_MENU_VIEW_STRATEGIC, false);
495+
}
492496

493497
auto *formatMenu = new wxMenu;
494498
AppendBitmapItem(formatMenu, GBT_MENU_FORMAT_LAYOUT, _("&Layout"),

0 commit comments

Comments
 (0)