mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Since we're now caching this, we can sort it once, rather than
lots of times.
This commit is contained in:
parent
0b67e103e9
commit
7fd1a14c1b
@ -2426,6 +2426,7 @@ vector<Format const *> const & BufferParams::exportableFormats(bool only_viewabl
|
|||||||
theConverters().getReachable(*it, only_viewable, false, excludes);
|
theConverters().getReachable(*it, only_viewable, false, excludes);
|
||||||
result.insert(result.end(), r.begin(), r.end());
|
result.insert(result.end(), r.begin(), r.end());
|
||||||
}
|
}
|
||||||
|
sort(result.begin(), result.end(), Format::formatSorter);
|
||||||
cached = result;
|
cached = result;
|
||||||
valid = true;
|
valid = true;
|
||||||
return cached;
|
return cached;
|
||||||
|
@ -2561,8 +2561,8 @@ void GuiDocument::updateDefaultFormat()
|
|||||||
outputModule->defaultFormatCO->clear();
|
outputModule->defaultFormatCO->clear();
|
||||||
outputModule->defaultFormatCO->addItem(qt_("Default"),
|
outputModule->defaultFormatCO->addItem(qt_("Default"),
|
||||||
QVariant(QString("default")));
|
QVariant(QString("default")));
|
||||||
vector<Format const *> formats = param_copy.exportableFormats(true);
|
vector<Format const *> const & formats =
|
||||||
sort(formats.begin(), formats.end(), Format::formatSorter);
|
param_copy.exportableFormats(true);
|
||||||
for (Format const * f : formats)
|
for (Format const * f : formats)
|
||||||
outputModule->defaultFormatCO->addItem
|
outputModule->defaultFormatCO->addItem
|
||||||
(toqstr(translateIfPossible(f->prettyname())),
|
(toqstr(translateIfPossible(f->prettyname())),
|
||||||
|
@ -1051,7 +1051,6 @@ void MenuDefinition::expandFormats(MenuItem::Kind const kind, Buffer const * buf
|
|||||||
LATTEST(false);
|
LATTEST(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sort(formats.begin(), formats.end(), Format::formatSorter);
|
|
||||||
|
|
||||||
bool const view_update = (kind == MenuItem::ViewFormats
|
bool const view_update = (kind == MenuItem::ViewFormats
|
||||||
|| kind == MenuItem::UpdateFormats);
|
|| kind == MenuItem::UpdateFormats);
|
||||||
|
Loading…
Reference in New Issue
Block a user