diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 9bbcca4b24..5dd704b87b 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,9 @@ +2003-07-16 Juergen Spitzmueller + + * QCitation.C: don't reset natbib styleCO when inserting new entry. + * QTabular.C: + * QTabularDialog.C: use poweruser input for tabular width (bug 1156). + 2003-07-11 Jean-Marc Lasgouttes * xfont_loader.C (addFontPath): condition message to Debug::FONT diff --git a/src/frontends/qt2/QCitation.C b/src/frontends/qt2/QCitation.C index 696ada36bb..b7606c7e84 100644 --- a/src/frontends/qt2/QCitation.C +++ b/src/frontends/qt2/QCitation.C @@ -112,6 +112,8 @@ void QCitation::fillStyles() if (!citekeys.empty()) key = citekeys[0]; + int const orig = dialog_->citationStyleCO->currentItem(); + dialog_->citationStyleCO->clear(); vector const & sty = controller().getCiteStrings(key); @@ -119,6 +121,9 @@ void QCitation::fillStyles() it != sty.end(); ++it) { dialog_->citationStyleCO->insertItem(toqstr(*it)); } + + if (orig != -1 && orig < dialog_->citationStyleCO->count()) + dialog_->citationStyleCO->setCurrentItem(orig); } diff --git a/src/frontends/qt2/QTabular.C b/src/frontends/qt2/QTabular.C index 7e14fdf006..4707eeffcd 100644 --- a/src/frontends/qt2/QTabular.C +++ b/src/frontends/qt2/QTabular.C @@ -166,13 +166,12 @@ void QTabular::update_contents() dialog_->specialAlignmentED->setEnabled(!isReadonly); LyXLength::UNIT default_unit = controller().metric() ? LyXLength::CM : LyXLength::IN; - if (!pwidth.zero()) { - dialog_->widthED->setText(toqstr(tostr(pwidth.value()))); - dialog_->widthUnit->setCurrentItem(pwidth.unit()); - } else { - dialog_->widthED->setText(""); - dialog_->widthUnit->setCurrentItem(default_unit); - } + string colwidth; + if (!pwidth.zero()) + colwidth = pwidth.asString(); + lengthToWidgets(dialog_->widthED, dialog_->widthUnit, + colwidth, default_unit); + dialog_->widthED->setEnabled(!isReadonly); dialog_->widthUnit->setEnabled(!isReadonly); diff --git a/src/frontends/qt2/QTabularDialog.C b/src/frontends/qt2/QTabularDialog.C index b0a9ee524a..e5c5d36c45 100644 --- a/src/frontends/qt2/QTabularDialog.C +++ b/src/frontends/qt2/QTabularDialog.C @@ -147,9 +147,7 @@ void QTabularDialog::specialAlignment_changed() void QTabularDialog::width_changed() { - string const width = - LyXLength(widthED->text().toDouble(), - widthUnit->currentLengthItem()).asString(); + string const width = widgetsToLength(widthED, widthUnit); if (form_->controller().isMulticolumnCell()) form_->controller().set(LyXTabular::SET_MPWIDTH, width); else