mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-12 11:32:21 +00:00
Since we're now caching this, we can sort it once, rather than
lots of times.
(cherry picked from commit 7fd1a14c1b
)
This commit is contained in:
parent
2775295014
commit
1cdbf23d69
@ -2436,6 +2436,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;
|
||||
|
@ -2545,11 +2545,9 @@ void GuiDocument::updateDefaultFormat()
|
||||
outputModule->defaultFormatCO->clear();
|
||||
outputModule->defaultFormatCO->addItem(qt_("Default"),
|
||||
QVariant(QString("default")));
|
||||
typedef vector<Format const *> Formats;
|
||||
Formats formats = param_copy.exportableFormats(true);
|
||||
sort(formats.begin(), formats.end(), Format::formatSorter);
|
||||
Formats::const_iterator cit = formats.begin();
|
||||
Formats::const_iterator end = formats.end();
|
||||
vector<Format const *> const & formats = param_copy.exportableFormats(true);
|
||||
vector<Format const *>::const_iterator cit = formats.begin();
|
||||
vector<Format const *>::const_iterator end = formats.end();
|
||||
for (; cit != end; ++cit)
|
||||
outputModule->defaultFormatCO->addItem(qt_((*cit)->prettyname()),
|
||||
QVariant(toqstr((*cit)->name())));
|
||||
|
@ -1055,7 +1055,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