Martin Vermeer wrote:
> Patch attached. Seems to work for me, at least for for various character
> attributes, and for rows/columns/sub-rectangles of the table.

Yes, works fine here too. The only irritating thing (and annoying, if you want 
to do several operations on a selection) is that only the last cell is 
selected afterwards.
I think we should restore the selection at the end, if we really need to 
select every single cell in the loop.

> Please test. There are still easy ways to crash tables, but
> I think this is an improvement. One crash you can get by painting
> several cells and then typing C-l for ERT. This could be easily
> eliminated by a separate switch case. Any others?

Basically all collapsables. The attached patch (against insettabular.C _with_ 
your patch attached) disables them when multiple cells are selected. This 
seems the right thing to do for me (and better than the 1.3 solution: insert 
the inset into the last selected cell).

Jürgen
Index: insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.454
diff -u -r1.454 insettabular.C
--- insettabular.C	8 Feb 2005 13:18:04 -0000	1.454
+++ insettabular.C	12 Mar 2005 18:15:34 -0000
@@ -907,6 +925,21 @@
 			break;
 		}
 		return true;
+	}
+	
+	// disable these with multiple cells selected
+	case LFUN_INSERT_CHARSTYLE:
+	case LFUN_INSET_FLOAT:
+	case LFUN_INSET_WIDE_FLOAT:
+	case LFUN_INSET_FOOTNOTE:
+	case LFUN_INSET_MARGINAL:
+	case LFUN_INSERT_NOTE:
+	case LFUN_INSET_OPTARG:
+	case LFUN_INSET_WRAP:
+	case LFUN_INSET_ERT: {
+		if (tablemode(cur))
+			status.enabled(false);
+			break;
 	}
 
 	default:

Reply via email to