]> git.lyx.org Git - features.git/commitdiff
Use the command-alternatives sequence as defined in menus.bind
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 3 Jan 2018 09:58:30 +0000 (10:58 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 3 Jan 2018 09:58:30 +0000 (10:58 +0100)
Otherwise, the shortcut is not displayed in the menu.

src/frontends/qt4/Menus.cpp

index 035fab40e38f74eb64f05fc3ae16679f32eb08e3..108d978f21b302250e23cb41f19efebfa44aabbe 100644 (file)
@@ -1904,8 +1904,11 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv,
                                                translateIfPossible(curlayout)):
                                        bformat(_("Separated %1$s Below"),
                                                translateIfPossible(curlayout));
+                       // 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_ENVIRONMENT_SPLIT)));
+                                    FuncRequest(LFUN_COMMAND_ALTERNATIVES,
+                                                from_ascii("environment-split ; environment-split previous"))));
                }
        }
        else if (!prevlayout.empty()) {
@@ -1914,9 +1917,11 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv,
                                translateIfPossible(prevlayout)) :
                        bformat(_("Separated %1$s Below"),
                                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_ENVIRONMENT_SPLIT,
-                                        from_ascii("previous"))));
+                            FuncRequest(LFUN_COMMAND_ALTERNATIVES,
+                                        from_ascii("environment-split ; environment-split previous"))));
        }
        if (!outerlayout.empty()) {
                docstring label;