From 25e088d6db92dd07f9b0e18d41039d4a807b1121 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 7 Feb 2003 14:56:29 +0000 Subject: [PATCH] fix bug 849 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@6059 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/QTabular.C | 21 ++++++++++++--------- status.13x | 5 ++++- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 9331874378..0bd7da7d53 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2003-02-07 Juergen Spitzmueller + + * QTabular.C (closeGUI): do not change if nothing has to + be changed (bug 849). + 2003-01-31 Michael Schmitt * ui/BulletsModuleBase.ui: Replace LaTeX font size names by LyX diff --git a/src/frontends/qt2/QTabular.C b/src/frontends/qt2/QTabular.C index 40a71982d0..7e14fdf006 100644 --- a/src/frontends/qt2/QTabular.C +++ b/src/frontends/qt2/QTabular.C @@ -328,17 +328,20 @@ void QTabular::closeGUI() // apply the fixed width values int cell = inset->getActCell(); - string str1 = LyXLength(dialog_->widthED->text().toDouble(), - dialog_->widthUnit->currentLengthItem()).asString(); + bool const multicol(controller().isMulticolumnCell()); + string str1 = widgetsToLength(dialog_->widthED, dialog_->widthUnit); string str2; + LyXLength llen(tabular->GetColumnPWidth(cell)); - if (llen.zero()) - str2 = ""; - else - str2 = llen.asString(); + LyXLength llenMulti(tabular->GetMColumnPWidth(cell)); + + if (multicol && !llenMulti.zero()) + str2 = llenMulti.asString(); + else if (!multicol && !llen.zero()) + str2 = llen.asString(); if (str1 != str2) { - if (controller().isMulticolumnCell()) + if (multicol) controller().set(LyXTabular::SET_MPWIDTH, str1); else controller().set(LyXTabular::SET_PWIDTH, str1); @@ -346,13 +349,13 @@ void QTabular::closeGUI() // apply the special alignment str1 = fromqstr(dialog_->specialAlignmentED->text()); - if (controller().isMulticolumnCell()) + if (multicol) str2 = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_MULTI); else str2 = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_COLUMN); if (str1 != str2) { - if (controller().isMulticolumnCell()) + if (multicol) controller().set(LyXTabular::SET_SPECIAL_MULTI, str1); else controller().set(LyXTabular::SET_SPECIAL_COLUMN, str1); diff --git a/status.13x b/status.13x index a795f333a1..b15fa7f869 100644 --- a/status.13x +++ b/status.13x @@ -24,10 +24,13 @@ What's new ** Bug fixes +- fix bug where opening the tabular dialog would mark the document as + changed [bug #849, qt only] + - in the dialogs, replace LaTeX font size names by LyX names for consistency reasons and to resolve a translation conflict - enable the debug level to be set in lyx2lyx -- fix strerror() build problem with some gcc/glibc versions (bug #874) +- fix strerror() build problem with some gcc/glibc versions [bug #874]