Fix the sorting of the formats in menus.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_1_6@1383 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2001-01-24 15:33:07 +00:00
parent 6600c0c56e
commit b70db4ad74

View File

@ -226,6 +226,13 @@ void Menu::checkShortcuts() const
}
}
class compare_format {
public:
bool operator()(Format const * p1, Format const * p2) {
return *p1 < *p2;
}
};
void Menu::expand(Menu & tomenu, Buffer * buf) const
{
for (const_iterator cit = begin();
@ -292,7 +299,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
formats = Exporter::GetExportableFormats(buf, false);
action = LFUN_EXPORT;
}
sort(formats.begin(), formats.end());
sort(formats.begin(), formats.end(), compare_format());
for (vector<Format const *>::const_iterator fit = formats.begin();
fit != formats.end() ; ++fit) {