]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Toolbars.cpp
Fix reloading of local layout file (bug #11120)
[lyx.git] / src / frontends / qt4 / Toolbars.cpp
index b2a9c37138c41568786a75e0bdf94abef31adca2..b43d61acf28959278accc334ed804f351bc6e97b 100644 (file)
@@ -194,9 +194,13 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                case TO_IMPORTFORMATS:
                case TO_UPDATEFORMATS:
                case TO_VIEWFORMATS: {
-                       vector<Format const *> formats = (code == TO_IMPORTFORMATS) ?
-                               theConverters().importableFormats() :
-                               theConverters().exportableFormats(true);
+                       FormatList formats;
+                       if (code == TO_IMPORTFORMATS)
+                               formats = theConverters().importableFormats();
+                       else if (code == TO_EXPORTFORMATS)
+                               formats = theConverters().exportableFormats(false);
+                       else
+                               formats = theConverters().exportableFormats(true);
                        sort(formats.begin(), formats.end());
                        for (Format const * f : formats) {
                                if (f->dummy())
@@ -229,7 +233,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                                FuncRequest func(lfun, f->name(),
                                                FuncRequest::TOOLBAR);
                                add(ToolbarItem(ToolbarItem::COMMAND, func,
-                                               bformat(tooltip, prettyname)));
+                                               bformat(tooltip, translateIfPossible(prettyname))));
                        }
                        break;
                }