]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSendto.cpp
rename buffer parameter math_number_before to math_numbering_side
[lyx.git] / src / frontends / qt4 / GuiSendto.cpp
index 13ba03d729764d4e21a17d2c8274782acab24718..92814f0da9dae7f3c8201aba1cd4e7533ac8741b 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "Buffer.h"
 #include "BufferParams.h"
+#include "Converter.h"
 #include "Format.h"
 #include "FuncRequest.h"
 
@@ -71,17 +72,17 @@ void GuiSendTo::changed_adaptor()
 
 void GuiSendTo::updateContents()
 {
-       all_formats_ = buffer().params().exportableFormats(false);
-       sort(all_formats_.begin(), all_formats_.end(), Format::formatSorter);
+       FormatList const & all_formats = 
+           buffer().params().exportableFormats(false);
        // Save the current selection if any
        Format const * current_format = nullptr;
        int const line = formatLW->currentRow();
-       if (line >= 0 && static_cast<unsigned int>(line) < all_formats_.size()
+       if (line >= 0 && static_cast<unsigned int>(line) < all_formats.size()
            && formatLW->selectedItems().size() > 0)
-               current_format = all_formats_[line];
+               current_format = all_formats[line];
        // Reset the list widget
        formatLW->clear();
-       for (Format const * f : all_formats_) {
+       for (Format const * f : all_formats) {
                formatLW->addItem(toqstr(translateIfPossible(f->prettyname())));
                // Restore the selection
                if (current_format && f->prettyname() == current_format->prettyname())
@@ -101,7 +102,9 @@ void GuiSendTo::applyView()
        if (line < 0 || line > formatLW->count())
                return;
 
-       format_ = all_formats_[line];
+       FormatList const & all_formats = 
+           buffer().params().exportableFormats(false);
+       format_ = all_formats[line];
        command_ = command;
 }