Fix list of viewable formats in view/update menu.

Also fix list in (currently unused) Export toolbar button.

Fixes: #11044
(cherry picked from commit ab6bd5e319)
This commit is contained in:
Juergen Spitzmueller 2018-02-21 10:17:10 +01:00
parent 17bf8fd74c
commit 8dde86d2de
3 changed files with 10 additions and 4 deletions

View 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;

View 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())

View 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