X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FMenus.cpp;h=91ab3f271e5a7b2a3c17daae75672fc82587d893;hb=ed44bbddee012f1cb38752142aba8e068dce47d2;hp=6690588ba4250946fc24acce39e14d991330d340;hpb=17abf68bac2859ce2d2e82a813daec2b20ef4467;p=features.git diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 6690588ba4..91ab3f271e 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -1230,13 +1230,16 @@ void MenuDefinition::expandFlexInsert( if (cit->second.lyxtype() == type) { if (!cit->second.obsoleted_by().empty()) continue; - docstring label = cit->first; + docstring name = cit->first; // we remove the "Flex:" prefix, if it is present - if (prefixIs(label, from_ascii("Flex:"))) - label = label.substr(5); + if (prefixIs(name, from_ascii("Flex:"))) + name = name.substr(5); + docstring const label = (cit->second.menustring().empty()) ? + name + : cit->second.menustring(); addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(translateIfPossible(label)), - FuncRequest(LFUN_FLEX_INSERT, Lexer::quoteString(label)))); + FuncRequest(LFUN_FLEX_INSERT, Lexer::quoteString(name)))); } } // FIXME This is a little clunky.