Fix displaying of link menu when `ENABLE_LINK=NO`.

We disable the items, but not the menu. So, there was an empty list
on `Options` > `Link` > `Type`.
This commit is contained in:
Edênis Freindorfer Azevedo 2019-09-16 14:22:26 -03:00 committed by Rafael Kitover
parent 07107096b8
commit 531172c4be
2 changed files with 7 additions and 1 deletions

View File

@ -2930,6 +2930,12 @@ bool MainFrame::BindControls()
gdbmi->GetMenu()->Remove(gdbmi);
gdbmi = NULL;
#endif
#ifdef NO_LINK
// remove this item from the menu completely
wxMenuItem* linkmi = XRCITEM("LinkMenu");
linkmi->GetMenu()->Remove(linkmi);
linkmi = NULL;
#endif
// if a recent menu is present, save its location
wxMenuItem* recentmi = XRCITEM("RecentMenu");

View File

@ -260,7 +260,7 @@
</object>
<object class="wxMenu">
<label>_Options</label>
<object class="wxMenu">
<object class="wxMenu" name="LinkMenu">
<label>_Link</label>
<object class="wxMenuItem" name="LanLink">
<label>Start _Network Link ...</label>