From a0b84e0ba0f8f23155f51b8647f3f6feed972c0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Fri, 29 Oct 2010 01:18:18 +0000 Subject: [PATCH] GuiTabular.cpp: fix #6585 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35894 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiTabular.cpp | 2 ++ src/insets/InsetTabular.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index a1f01c4d73..8ec1164148 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -176,6 +176,8 @@ void GuiTabular::checkEnabled() interlinespaceED->setEnabled(interlinespaceCO->currentIndex() == 2); interlinespaceUnit->setEnabled(interlinespaceCO->currentIndex() == 2); + // setting as longtable is not allowed when table is inside a float + longTabularCB->setEnabled(funcEnabled(Tabular::SET_LONGTABULAR)); bool const longtabular = longTabularCB->isChecked(); longtableGB->setEnabled(true); newpageCB->setEnabled(longtabular); diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 00a155d918..ffbe4f96a5 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -4313,6 +4313,9 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd, break; case Tabular::SET_LONGTABULAR: + // setting as longtable is not allowed when table is inside a float + if (cur.innerInsetOfType(FLOAT_CODE) != 0) + status.setEnabled(false); status.setOnOff(tabular.is_long_tabular); break; -- 2.39.2