mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Hide OptSubmenus (#9717)
At d449e7e6
it has been decided that submenus are going to be displayed even if
all their items are disabled. Here we make an exception for OptSubmenus.
Example of submenu no longer shown: Insert > Insert Regexp
Example of submenu always shown: Edit > Math > Limit Type, Macro Definition
This commit is contained in:
parent
dc016de34e
commit
6cc6934378
@ -418,7 +418,8 @@ void MenuDefinition::addWithStatusCheck(MenuItem const & i)
|
||||
// Only these kind of items affect the status of the submenu
|
||||
if ((cit->kind() == MenuItem::Command
|
||||
|| cit->kind() == MenuItem::Submenu
|
||||
|| cit->kind() == MenuItem::Help)) {
|
||||
|| cit->kind() == MenuItem::Help)
|
||||
&& (!i.optional() || cit->status().enabled())) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user