]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Menus.cpp
Use QMessageBox for toggleWarning if possible
[lyx.git] / src / frontends / qt4 / Menus.cpp
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;