]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Menus.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / Menus.cpp
index 4fb3ce22275e4917f87a0c9468ef3057bdf73784..c68ecbe5a5575f174ce1938d4539602232083b00 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;
@@ -2552,7 +2553,7 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial)
                // On Mac OS with QT/cocoa, the menu is not displayed if there is no action
                // so we create a temporary one here
                QAction * action = new QAction(menuptr);
-               menu->addAction(action);
+               menuptr->addAction(action);
 #endif
 
                qmb->addMenu(menuptr);