]> git.lyx.org Git - features.git/commitdiff
Fix duplicate, disabled "Separated Frame Below"
authorScott Kostyshak <skostysh@lyx.org>
Sat, 28 Apr 2018 03:01:01 +0000 (23:01 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sun, 29 Apr 2018 04:05:15 +0000 (00:05 -0400)
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)

src/frontends/qt4/Menus.cpp
status.23x

index 4ced58975f2c3b50f3b4bedc50312b3b032f4752..3773fd9d7af01a2081d96578da47b6838e6d521c 100644 (file)
@@ -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;
index bb4bfedbecb0543053043d0619212801c4fe21a0..f1074f5aa06db6c85ab54319b856d47d54503937 100644 (file)
@@ -234,6 +234,8 @@ What's new
 
 - Do not allow paragraph styles in listings (bug 11127).
 
+- Fix duplicate, disabled "Separated <Environment> Below" menu item.
+
 
 * INTERNALS