From 8dde86d2de44786fc9f13a101037dec32eb6922a Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 21 Feb 2018 10:17:10 +0100 Subject: [PATCH] Fix list of viewable formats in view/update menu. Also fix list in (currently unused) Export toolbar button. Fixes: #11044 (cherry picked from commit ab6bd5e3190e61fa46eb2fd057cdf7f71faf3f38) --- src/frontends/qt4/Menus.cpp | 2 +- src/frontends/qt4/Toolbars.cpp | 10 +++++++--- status.23x | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index d08517f00b..4ced58975f 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -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; diff --git a/src/frontends/qt4/Toolbars.cpp b/src/frontends/qt4/Toolbars.cpp index 2c0d2ab1a3..32d438faeb 100644 --- a/src/frontends/qt4/Toolbars.cpp +++ b/src/frontends/qt4/Toolbars.cpp @@ -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()) diff --git a/status.23x b/status.23x index 42bc947d4d..407f06c703 100644 --- a/status.23x +++ b/status.23x @@ -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