From 1b2dd66f789a8adab4e97d97e7dcb5d1d338b594 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 3 Jan 2018 10:58:30 +0100 Subject: [PATCH] Use the command-alternatives sequence as defined in menus.bind Otherwise, the shortcut is not displayed in the menu. (cherry picked from commit 7d2764fb9ed708c36c636c88ce40149988f3b941) --- src/frontends/qt4/Menus.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 035fab40e3..108d978f21 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -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; -- 2.39.5