]> git.lyx.org Git - features.git/commitdiff
GuiTabular.cpp: fix #6585
authorUwe Stöhr <uwestoehr@web.de>
Fri, 29 Oct 2010 01:18:18 +0000 (01:18 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Fri, 29 Oct 2010 01:18:18 +0000 (01:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35894 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiTabular.cpp
src/insets/InsetTabular.cpp

index a1f01c4d7386a088426d57765d9aadae5917533b..8ec1164148f4e8110dcd28272116f7968b0d87d5 100644 (file)
@@ -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);
index 00a155d91843367525ac2cf49b2b91c41164f9bb..ffbe4f96a57786b6fa41f03032240c6420576a24 100644 (file)
@@ -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;