Joao Luis Meloni Assirati wrote:
> This bug occours only with the qt frontend and is very small. Open any
> document that has a table and click with the right button, then press
> close in the table panel. The document is then marked "changed", but no
> modification was made.

Yes, my fault. The comparision between dialog and inset is not correct. The 
attached patch fixes this. 
Lars, you have to decide if you want to apply this now or not.

Jürgen.
Index: src/frontends/qt2/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.383
diff -u -r1.383 ChangeLog
--- src/frontends/qt2/ChangeLog	2003/01/23 16:23:39	1.383
+++ src/frontends/qt2/ChangeLog	2003/01/25 18:18:48
@@ -1,3 +1,7 @@
+2003-01-25  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+
+	* QTabular.C (closeGUI): do not change if nothing has to be changed.
+
 2003-01-23  John Levon  <[EMAIL PROTECTED]>

 	* ui/*.ui: move several group box labels to title capitalisation
Index: src/frontends/qt2/QTabular.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QTabular.C,v
retrieving revision 1.10
diff -u -r1.10 QTabular.C
--- src/frontends/qt2/QTabular.C	2002/12/17 20:37:10	1.10
+++ src/frontends/qt2/QTabular.C	2003/01/25 18:18:49
@@ -328,17 +328,20 @@
 
 	// 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 @@
 
 	// 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);

Reply via email to