diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 67062aa615..7402a0539c 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -448,9 +448,6 @@ void GuiTabular::ltHeaderStatus_clicked() set(Tabular::SET_LTHEAD, ""); else set(Tabular::UNSET_LTHEAD, ""); - headerBorderAboveCB->setEnabled(enable); - headerBorderBelowCB->setEnabled(enable); - firstheaderNoContentsCB->setEnabled(enable); changed(); } @@ -502,8 +499,6 @@ void GuiTabular::ltFirstHeaderStatus_clicked() set(Tabular::SET_LTFIRSTHEAD, ""); else set(Tabular::UNSET_LTFIRSTHEAD, ""); - firstheaderBorderAboveCB->setEnabled(enable); - firstheaderBorderBelowCB->setEnabled(enable); changed(); } @@ -515,9 +510,6 @@ void GuiTabular::ltFirstHeaderEmpty_clicked() set(Tabular::SET_LTFIRSTHEAD, "empty"); else set(Tabular::UNSET_LTFIRSTHEAD, "empty"); - firstheaderStatusCB->setEnabled(!enable); - firstheaderBorderAboveCB->setEnabled(!enable); - firstheaderBorderBelowCB->setEnabled(!enable); changed(); } @@ -529,9 +521,6 @@ void GuiTabular::ltFooterStatus_clicked() set(Tabular::SET_LTFOOT, ""); else set(Tabular::UNSET_LTFOOT, ""); - footerBorderAboveCB->setEnabled(enable); - footerBorderBelowCB->setEnabled(enable); - lastfooterNoContentsCB->setEnabled(enable); changed(); } @@ -563,8 +552,6 @@ void GuiTabular::ltLastFooterStatus_clicked() set(Tabular::SET_LTLASTFOOT, ""); else set(Tabular::UNSET_LTLASTFOOT, ""); - lastfooterBorderAboveCB->setEnabled(enable); - lastfooterBorderBelowCB->setEnabled(enable); changed(); } @@ -596,9 +583,6 @@ void GuiTabular::ltLastFooterEmpty_clicked() set(Tabular::SET_LTLASTFOOT, "empty"); else set(Tabular::UNSET_LTLASTFOOT, "empty"); - lastfooterStatusCB->setEnabled(!enable); - lastfooterBorderAboveCB->setEnabled(!enable); - lastfooterBorderBelowCB->setEnabled(!enable); changed(); } @@ -838,12 +822,7 @@ void GuiTabular::updateContents() // first header can only be suppressed when there is a header firstheaderNoContentsCB->setEnabled(tabular_.haveLTHead() && !tabular_.haveLTFirstHead()); - // check if setting a first header is allowed - // additionally check firstheaderStatusCB because when this is the - // case a first header makes no sense - firstheaderStatusCB->setEnabled( - funcEnabled(Tabular::SET_LTFIRSTHEAD) - && !firstheaderNoContentsCB->isChecked()); + //firstheaderStatusCB->setEnabled( // !firstheaderNoContentsCB->isChecked()); headerBorderAboveCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD)); @@ -859,12 +838,7 @@ void GuiTabular::updateContents() // last footer can only be suppressed when there is a footer lastfooterNoContentsCB->setEnabled(tabular_.haveLTFoot() && !tabular_.haveLTLastFoot()); - // check if setting a last footer is allowed - // additionally check lastfooterNoContentsCB because when this is - // the case a last footer makes no sense - lastfooterStatusCB->setEnabled( - funcEnabled(Tabular::SET_LTLASTFOOT) - && !lastfooterNoContentsCB->isChecked()); + captionStatusCB->setEnabled( funcEnabled(Tabular::TOGGLE_LTCAPTION)); // When a row is set as longtable caption, it must not be allowed @@ -890,6 +864,12 @@ void GuiTabular::updateContents() } row_set = tabular_.getRowOfLTFirstHead(row, ltt); + // check if setting a first header is allowed + // additionally check firstheaderStatusCB because when this is the + // case a first header makes no sense + firstheaderStatusCB->setEnabled( + funcEnabled(Tabular::SET_LTFIRSTHEAD) + && !firstheaderNoContentsCB->isChecked()); firstheaderStatusCB->setChecked(row_set); if (ltt.set && (!ltt.empty || !use_empty)) { firstheaderBorderAboveCB->setChecked(ltt.topDL); @@ -922,6 +902,12 @@ void GuiTabular::updateContents() } row_set = tabular_.getRowOfLTLastFoot(row, ltt); + // check if setting a last footer is allowed + // additionally check lastfooterNoContentsCB because when this is + // the case a last footer makes no sense + lastfooterStatusCB->setEnabled( + funcEnabled(Tabular::SET_LTLASTFOOT) + && !lastfooterNoContentsCB->isChecked()); lastfooterStatusCB->setChecked(row_set); if (ltt.set && (!ltt.empty || !use_empty)) { lastfooterBorderAboveCB->setChecked(ltt.topDL);