hide unavailable menu items in the editor (broken recently)
This commit is contained in:
parent
87b78deb07
commit
8a3b1cf538
1 changed files with 4 additions and 0 deletions
|
@ -985,6 +985,10 @@ void editor_controller::show_menu(const std::vector<std::string>& items_arg, int
|
|||
} else {
|
||||
hotkey::get_hotkey(*i).set_description(_("Can't Redo"));
|
||||
}
|
||||
} else if(!can_execute_command(command)
|
||||
|| (context_menu && !in_context_menu(command))) {
|
||||
i = items.erase(i);
|
||||
continue;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue