]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/Menus.cpp
Get rid of "CharStyle:", "Custom:", and "Element:" prefixes, per a
[features.git] / src / frontends / qt4 / Menus.cpp
index bc0f469bf24008259dc8a8716539f99e7adad8d6..93550577eff575e81eaafd4e15d554b430fc95bb 100644 (file)
@@ -1090,7 +1090,10 @@ void MenuDefinition::expandFlexInsert(
        TextClass::InsetLayouts::const_iterator end = insetLayouts.end();
        for (; cit != end; ++cit) {
                if (cit->second.lyxtype() == type) {
-                       docstring const label = cit->first;
+                       docstring label = cit->first;
+                       // we remove the "Flex:" prefix, if it is present
+                       if (prefixIs(label, from_utf8("Flex:")))
+                               label = label.substr(5);
                        addWithStatusCheck(MenuItem(MenuItem::Command, 
                                toqstr(translateIfPossible(label)),
                                FuncRequest(LFUN_FLEX_INSERT, Lexer::quoteString(label))));