mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Hide OptSubmenus (#9717) (for real this time)
Amend6cc69343
andd449e7e6
. See the latter for the rationale behind this change.
This commit is contained in:
parent
6cc6934378
commit
54a28ca2dc
@ -419,7 +419,7 @@ void MenuDefinition::addWithStatusCheck(MenuItem const & i)
|
||||
if ((cit->kind() == MenuItem::Command
|
||||
|| cit->kind() == MenuItem::Submenu
|
||||
|| cit->kind() == MenuItem::Help)
|
||||
&& (!i.optional() || cit->status().enabled())) {
|
||||
&& cit->status().enabled()) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
@ -1771,7 +1771,7 @@ void Menu::Impl::populate(QMenu & qMenu, MenuDefinition const & menu)
|
||||
else if (m->kind() == MenuItem::Submenu) {
|
||||
QMenu * subMenu = qMenu.addMenu(label(*m));
|
||||
populate(*subMenu, m->submenu());
|
||||
subMenu->setEnabled(m->status().enabled());
|
||||
subMenu->setEnabled(!subMenu->isEmpty());
|
||||
} else {
|
||||
// we have a MenuItem::Command
|
||||
qMenu.addAction(new Action(QIcon(), label(*m),
|
||||
|
Loading…
Reference in New Issue
Block a user