>>>>> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes:

Edwin> in the qt frontend that is. The minibuffer says "Command
Edwin> disabled" when I try to cut a range of cells of a tabular in a
Edwin> table float. Cutting cells when the tabular is not in a float
Edwin> works just fine.

Edwin> Is this a qt specific problem?

No, it is general. Here is a patch.

Lars, is that OK?

JMarc

? po/lyx-1.3.0cvs.pot
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.1005
diff -u -p -r1.1005 ChangeLog
--- src/ChangeLog	6 Jan 2003 14:02:19 -0000	1.1005
+++ src/ChangeLog	6 Jan 2003 16:13:33 -0000
@@ -1,3 +1,8 @@
+2003-01-06  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* lyxfunc.C (getStatus): fix disabling of cut/paste of cells in a
+	tabular in a float
+
 2003-01-06  Michael Schmitt <[EMAIL PROTECTED]>
 
 	* LColor.C:
Index: src/lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.390
diff -u -p -r1.390 lyxfunc.C
--- src/lyxfunc.C	6 Jan 2003 14:02:21 -0000	1.390
+++ src/lyxfunc.C	6 Jan 2003 16:13:36 -0000
@@ -338,9 +338,12 @@ FuncStatus LyXFunc::getStatus(FuncReques
 		break;
 	case LFUN_CUT:
 	case LFUN_COPY:
-		if (tli && tli->lyxCode() == Inset::TABULAR_CODE) {
-			InsetTabular * t(static_cast<InsetTabular*>(tli));
-			if (t->hasSelection()) {
+		if (tli) {
+			UpdatableInset * in = tli;
+			if (in->lyxCode() != Inset::TABULAR_CODE) {
+				in = tli->getFirstLockingInsetOfType(Inset::TABULAR_CODE);
+			}
+			if (in && static_cast<InsetTabular*>(in)->hasSelection()) {
 				disable = false;
 				break;
 			}

Reply via email to