mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +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
@ -417,8 +417,9 @@ void MenuDefinition::addWithStatusCheck(MenuItem const & i)
|
||||
cit != i.submenu().end(); ++cit) {
|
||||
// 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::Submenu
|
||||
|| cit->kind() == MenuItem::Help)
|
||||
&& (!i.optional() || cit->status().enabled())) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user