From: Scott Kostyshak Date: Sat, 28 Apr 2018 03:01:01 +0000 (-0400) Subject: Fix duplicate, disabled "Separated Frame Below" X-Git-Tag: 2.3.1~97 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6a808d285c0e88ed17ff40b3f45617a9f57edddb;p=features.git 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. (cherry picked from commit 4f7a5f8c3e1bb633a9ee92cf692a116180537073) --- diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 4ced58975f..3773fd9d7a 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; diff --git a/status.23x b/status.23x index bb4bfedbec..f1074f5aa0 100644 --- a/status.23x +++ b/status.23x @@ -234,6 +234,8 @@ What's new - Do not allow paragraph styles in listings (bug 11127). +- Fix duplicate, disabled "Separated Below" menu item. + * INTERNALS