GuiTabular.cpp: fix #6585

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35894 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2010-10-29 01:18:18 +00:00
parent 2bbf8e5f2d
commit a0b84e0ba0
2 changed files with 5 additions and 0 deletions

View 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);

View 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;