From cc9e364d83eec9423caae80887f74c288b4e1ba9 Mon Sep 17 00:00:00 2001 From: Edwin Leuven Date: Wed, 19 Sep 2007 10:16:44 +0000 Subject: [PATCH] make sure formats are sorted and converters up-to-date git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20357 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPrefs.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 28fc43e630..4f85aacd23 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -931,9 +931,9 @@ PrefConverters::PrefConverters(GuiPrefsDialog * form, QWidget * parent) this, SLOT(converter_changed())); connect(converterToCO, SIGNAL(activated(const QString&)), this, SLOT(converter_changed())); - connect(converterED, SIGNAL(textChanged(const QString&)), + connect(converterED, SIGNAL(textEdited(const QString&)), this, SLOT(converter_changed())); - connect(converterFlagED, SIGNAL(textChanged(const QString&)), + connect(converterFlagED, SIGNAL(textEdited(const QString&)), this, SLOT(converter_changed())); connect(converterNewPB, SIGNAL(clicked()), this, SIGNAL(changed())); @@ -941,7 +941,7 @@ PrefConverters::PrefConverters(GuiPrefsDialog * form, QWidget * parent) this, SIGNAL(changed())); connect(converterModifyPB, SIGNAL(clicked()), this, SIGNAL(changed())); - connect(maxAgeLE, SIGNAL(textChanged(const QString&)), + connect(maxAgeLE, SIGNAL(textEdited(const QString&)), this, SIGNAL(changed())); maxAgeLE->setValidator(new QDoubleValidator(maxAgeLE)); @@ -968,6 +968,8 @@ void PrefConverters::update(LyXRC const & rc) void PrefConverters::updateGui() { + form_->formats().sort(); + form_->converters().update(form_->formats()); // save current selection QString current = converterFromCO->currentText() + " -> " + converterToCO->currentText(); @@ -1035,8 +1037,8 @@ void PrefConverters::converter_changed() void PrefConverters::updateButtons() { - Format const & from(form_->formats().get(converterFromCO->currentIndex())); - Format const & to(form_->formats().get(converterToCO->currentIndex())); + Format const & from = form_->formats().get(converterFromCO->currentIndex()); + Format const & to = form_->formats().get(converterToCO->currentIndex()); int const sel = form_->converters().getNumber(from.name(), to.name()); bool const known = !(sel < 0); bool const valid = !(converterED->text().isEmpty() @@ -1331,7 +1333,6 @@ void PrefFileformats::updatePrettyname() return; currentFormat().setPrettyname(newname); - form_->converters().update(form_->formats()); formatsChanged(); updateView(); changed(); @@ -1368,7 +1369,6 @@ void PrefFileformats::on_formatRemovePB_clicked() } form_->formats().erase(current_text); - form_->converters().update(form_->formats()); formatsChanged(); updateView(); on_formatsCB_editTextChanged(formatsCB->currentText()); -- 2.39.2