]> git.lyx.org Git - features.git/commitdiff
Fix list of viewable formats in view/update menu.
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 21 Feb 2018 09:17:10 +0000 (10:17 +0100)
committerRichard Heck <rgheck@lyx.org>
Sat, 17 Mar 2018 19:44:05 +0000 (15:44 -0400)
Also fix list in (currently unused) Export toolbar button.

Fixes: #11044
(cherry picked from commit ab6bd5e3190e61fa46eb2fd057cdf7f71faf3f38)

src/frontends/qt4/Menus.cpp
src/frontends/qt4/Toolbars.cpp
status.23x

index d08517f00bf1ec4450c24b60e03338d092e4b320..4ced58975f2c3b50f3b4bedc50312b3b032f4752 100644 (file)
@@ -1123,7 +1123,7 @@ void MenuDefinition::expandFormats(MenuItem::Kind const kind, Buffer const * buf
                                add(MenuItem(MenuItem::Command, toqstr(lbl), FuncRequest(action)));
                                continue;
                        }
-               // fall through
+                       break;
                case MenuItem::ExportFormats:
                        if (!f->inExportMenu())
                                continue;
index 2e15775d0ab739b0007942081e1466636bef5a28..b43d61acf28959278accc334ed804f351bc6e97b 100644 (file)
@@ -194,9 +194,13 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                case TO_IMPORTFORMATS:
                case TO_UPDATEFORMATS:
                case TO_VIEWFORMATS: {
-                       FormatList 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())
index 42bc947d4d474cd7e8b0f8cbe4a0cb8720816cf6..407f06c703763f42bc0c1f9cd9ad536e4267fb2b 100644 (file)
@@ -60,6 +60,8 @@ What's new
 - When entering a math macro name, Escape properly cancels the
   operation (bug 9251).
 
+- Fix list of viewable formats in view/update menu (bug 11044).
+
 
 * INTERNALS