From 4f7a5f8c3e1bb633a9ee92cf692a116180537073 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Fri, 27 Apr 2018 23:01:01 -0400 Subject: [PATCH] Fix duplicate, disabled "Separated Frame Below" This commit fixes an issue where the menu option "Insert Separated Frame Below" would show up twice, with one instance disabled. This occurred when there was a "Standard" environment nested in a "Frame". With this commit, the duplicate instance is removed. --- src/frontends/qt4/Menus.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 662ea66046..c68ecbe5a5 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -1917,9 +1917,10 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv, translateIfPossible(prevlayout)); // We use command-alternatives here since this is how the binding is defined // (otherwise, the binding is not displayed in the menu) - add(MenuItem(MenuItem::Command, toqstr(label), - FuncRequest(LFUN_COMMAND_ALTERNATIVES, - from_ascii("environment-split ; environment-split previous")))); + if (getStatus(FuncRequest(LFUN_ENVIRONMENT_SPLIT)).enabled()) + add(MenuItem(MenuItem::Command, toqstr(label), + FuncRequest(LFUN_COMMAND_ALTERNATIVES, + from_ascii("environment-split ; environment-split previous")))); } if (!outerlayout.empty()) { docstring label;