parent
50da39d30b
commit
def5bd6797
@ -320,7 +320,10 @@ static void add_tabs_as_menu(wxMenuBar* bar, MainFrame* main_frame, wxWindow* ba
|
|||||||
bar_parent->Bind(wxEVT_MENU_OPEN, [main_frame, bar, is_mainframe_menu](wxMenuEvent& event) {
|
bar_parent->Bind(wxEVT_MENU_OPEN, [main_frame, bar, is_mainframe_menu](wxMenuEvent& event) {
|
||||||
wxMenu* const menu = event.GetMenu();
|
wxMenu* const menu = event.GetMenu();
|
||||||
if (!menu || menu->GetMenuItemCount() > 0) {
|
if (!menu || menu->GetMenuItemCount() > 0) {
|
||||||
event.Skip(); // it is verry important to next pricessing of the wxEVT_UPDATE_UI by this menu
|
// If we are here it means that we open regular menu and not a tab used as a menu
|
||||||
|
event.Skip(); // event.Skip() is verry important to next processing of the wxEVT_UPDATE_UI by this menu items.
|
||||||
|
// If wxEVT_MENU_OPEN will not be pocessed in next event queue then MenuItems of this menu will never caught wxEVT_UPDATE_UI
|
||||||
|
// and, as a result, "check/radio value" will not be updated
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user