mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +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);
|
||||
result.insert(result.end(), r.begin(), r.end());
|
||||
}
|
||||
sort(result.begin(), result.end(), Format::formatSorter);
|
||||
cached = result;
|
||||
valid = true;
|
||||
return cached;
|
||||
|
@ -2561,8 +2561,8 @@ void GuiDocument::updateDefaultFormat()
|
||||
outputModule->defaultFormatCO->clear();
|
||||
outputModule->defaultFormatCO->addItem(qt_("Default"),
|
||||
QVariant(QString("default")));
|
||||
vector<Format const *> formats = param_copy.exportableFormats(true);
|
||||
sort(formats.begin(), formats.end(), Format::formatSorter);
|
||||
vector<Format const *> const & formats =
|
||||
param_copy.exportableFormats(true);
|
||||
for (Format const * f : formats)
|
||||
outputModule->defaultFormatCO->addItem
|
||||
(toqstr(translateIfPossible(f->prettyname())),
|
||||
|
@ -1051,7 +1051,6 @@ void MenuDefinition::expandFormats(MenuItem::Kind const kind, Buffer const * buf
|
||||
LATTEST(false);
|
||||
return;
|
||||
}
|
||||
sort(formats.begin(), formats.end(), Format::formatSorter);
|
||||
|
||||
bool const view_update = (kind == MenuItem::ViewFormats
|
||||
|| kind == MenuItem::UpdateFormats);
|
||||
|
Loading…
Reference in New Issue
Block a user