From: Richard Heck Date: Mon, 8 Aug 2011 14:20:38 +0000 (+0000) Subject: Fix bug #7714 by sorting the formats. X-Git-Tag: 2.1.0beta1~2849 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8fee557d6d801b390c66f7f0db323cce87e6592a;p=features.git Fix bug #7714 by sorting the formats. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39436 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiSendto.cpp b/src/frontends/qt4/GuiSendto.cpp index 408b5a4f12..7ee8d384d6 100644 --- a/src/frontends/qt4/GuiSendto.cpp +++ b/src/frontends/qt4/GuiSendto.cpp @@ -22,6 +22,8 @@ #include "support/qstring_helpers.h" #include "support/filetools.h" +#include + #include #include #include @@ -65,10 +67,17 @@ void GuiSendTo::changed_adaptor() changed(); } +namespace { +bool formatSorter(Format const * lhs, Format const * rhs) { + return lhs->prettyname() < rhs->prettyname(); +} +} // end namespace void GuiSendTo::updateContents() { all_formats_ = buffer().params().exportableFormats(false); + + sort(all_formats_.begin(), all_formats_.end(), formatSorter); // Save the current selection if any Format const * current_format = 0;