]> git.lyx.org Git - features.git/commitdiff
Fix bug #7714 by sorting the formats.
authorRichard Heck <rgheck@comcast.net>
Mon, 8 Aug 2011 14:20:38 +0000 (14:20 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 8 Aug 2011 14:20:38 +0000 (14:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39436 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiSendto.cpp

index 408b5a4f124534cfce20e894b7cf47636f23f980..7ee8d384d6934de10c6887d83823f21bbc111463 100644 (file)
@@ -22,6 +22,8 @@
 #include "support/qstring_helpers.h"
 #include "support/filetools.h"
 
+#include <algorithm>
+
 #include <QLineEdit>
 #include <QListWidget>
 #include <QPushButton>
@@ -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;