Lars Gullik Bjønnes wrote:
> Have to see patch first.

Attached is a patch against 1.3.7cvs. I cannot make a patch against HEAD at 
the moment, because I have other pending changes in insettabular. However, 
the patch would look the same.

It turned out that I couldn't delete the automatism from BLOCK to CENTER on a 
change from fixed width to non-fixed width, because the frontends do not 
reset the alignment, even if the widgets are reset (due to the strange 
interface/apply-mechanism of the tabular dialog).

This means that in some cases there are still two undo steps necessary. I 
think we need some kind of "undo grouping" to fix this properly.

In the patch, I have changed the switch BLOCK->CENTER to BLOCK->LEFT, wince I 
find this more intuitive, but I can revert it to the old behaviour if this is 
desired.

Regards,
Jürgen
Index: insets/insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.235.2.1
diff -u -r1.235.2.1 insettabular.C
--- insets/insettabular.C	7 Dec 2004 10:49:38 -0000	1.235.2.1
+++ insets/insettabular.C	4 Sep 2005 09:45:21 -0000
@@ -1929,10 +1929,7 @@
 
 		if (vallen.zero()
 		    && tabular->GetAlignment(actcell, true) == LYX_ALIGN_BLOCK)
-			tabularFeatures(bv, LyXTabular::ALIGN_CENTER, string());
-		else if (!vallen.zero()
-			 && tabular->GetAlignment(actcell, true) != LYX_ALIGN_BLOCK)
-			tabularFeatures(bv, LyXTabular::ALIGN_BLOCK, string());
+			tabularFeatures(bv, LyXTabular::ALIGN_LEFT, string());
 	}
 	break;
 	case LyXTabular::SET_MPWIDTH:

Reply via email to