From 75e66e9d4c0f9cbc5de624d2de4e29df67141314 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 7 Aug 2009 15:29:36 +0000 Subject: [PATCH] branch: Fix a few enable/disable problems for longtables: - set header, set first-header-empty, unset first-header-empty, - set header, set first-header-empty, unset header The same also for footers. see r29716. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30905 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiTabular.cpp | 29 ++++++++++++----------------- status.16x | 3 +++ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 71e937eab6..34d75ba4a2 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -451,9 +451,6 @@ void GuiTabular::ltHeaderStatus_clicked() set(Tabular::SET_LTHEAD, ""); else set(Tabular::UNSET_LTHEAD, ""); - headerBorderAboveCB->setEnabled(enable); - headerBorderBelowCB->setEnabled(enable); - firstheaderNoContentsCB->setEnabled(enable); changed(); } @@ -505,8 +502,6 @@ void GuiTabular::ltFirstHeaderStatus_clicked() set(Tabular::SET_LTFIRSTHEAD, ""); else set(Tabular::UNSET_LTFIRSTHEAD, ""); - firstheaderBorderAboveCB->setEnabled(enable); - firstheaderBorderBelowCB->setEnabled(enable); changed(); } @@ -518,9 +513,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(); } @@ -532,9 +524,6 @@ void GuiTabular::ltFooterStatus_clicked() set(Tabular::SET_LTFOOT, ""); else set(Tabular::UNSET_LTFOOT, ""); - footerBorderAboveCB->setEnabled(enable); - footerBorderBelowCB->setEnabled(enable); - lastfooterNoContentsCB->setEnabled(enable); changed(); } @@ -566,8 +555,6 @@ void GuiTabular::ltLastFooterStatus_clicked() set(Tabular::SET_LTLASTFOOT, ""); else set(Tabular::UNSET_LTLASTFOOT, ""); - lastfooterBorderAboveCB->setEnabled(enable); - lastfooterBorderBelowCB->setEnabled(enable); changed(); } @@ -599,9 +586,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(); } @@ -845,7 +829,6 @@ void GuiTabular::updateContents() // a first header makes no sense firstheaderStatusCB->setEnabled(funcEnabled(Tabular::SET_LTFIRSTHEAD) && !firstheaderNoContentsCB->isChecked()); - //firstheaderStatusCB->setEnabled(!firstheaderNoContentsCB->isChecked()); headerBorderAboveCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD)); headerBorderBelowCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD)); headerStatusCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD)); @@ -886,6 +869,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); @@ -918,6 +907,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); diff --git a/status.16x b/status.16x index aef9419b6c..a733df29ef 100644 --- a/status.16x +++ b/status.16x @@ -308,6 +308,9 @@ What's new - Add the emf an wmf graphics format as a parameter of LFUN_PASTE. +- Fix the enabling and disabling of some items in the longtable + section of the tabular dialog. + * DOCUMENTATION AND LOCALIZATION