]> git.lyx.org Git - features.git/commitdiff
GuiTabular.cpp: revert r30422 as discussed o the list
authorUwe Stöhr <uwestoehr@web.de>
Sat, 11 Jul 2009 11:10:38 +0000 (11:10 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sat, 11 Jul 2009 11:10:38 +0000 (11:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30472 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiTabular.cpp

index 669b6b4f0dec71bf954453efa6e22358f6290ef0..76c4f95da7307e97d871954f068f2949bb968e65 100644 (file)
@@ -822,12 +822,9 @@ void GuiTabular::updateContents()
        // first header can only be suppressed when there is a header
        firstheaderNoContentsCB->setEnabled(tabular_.haveLTHead()
                && !tabular_.haveLTFirstHead());
-       // When there is a header but no first header, set the first header
-       // as empty . Otherwise longtable's caption handling would be broken,
-       // see bug 6057.
-       firstheaderNoContentsCB->setChecked(tabular_.haveLTHead()
-               && !tabular_.haveLTFirstHead());
-       
+
+       //firstheaderStatusCB->setEnabled(
+       //      !firstheaderNoContentsCB->isChecked());
        headerBorderAboveCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD));
        headerBorderBelowCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD));
        headerStatusCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD));
@@ -870,8 +867,11 @@ void GuiTabular::updateContents()
 
        row_set = tabular_.getRowOfLTFirstHead(row, ltt);
        // check if setting a first header is allowed
+       // additionally check firstheaderNoContentsCB because when this is
+       // the case a first header makes no sense
        firstheaderStatusCB->setEnabled(
-               funcEnabled(Tabular::SET_LTFIRSTHEAD));
+               funcEnabled(Tabular::SET_LTFIRSTHEAD)
+               && !firstheaderNoContentsCB->isChecked());
        firstheaderStatusCB->setChecked(row_set);
        if (ltt.set && (!ltt.empty || !use_empty)) {
                firstheaderBorderAboveCB->setChecked(ltt.topDL);
@@ -881,6 +881,10 @@ void GuiTabular::updateContents()
                firstheaderBorderBelowCB->setEnabled(false);
                firstheaderBorderAboveCB->setChecked(false);
                firstheaderBorderBelowCB->setChecked(false);
+               if (use_empty) {
+                       if (ltt.empty)
+                               firstheaderStatusCB->setEnabled(false);
+               }
        }
 
        row_set = tabular_.getRowOfLTFoot(row, ltt);
@@ -972,12 +976,6 @@ void GuiTabular::closeGUI()
                        set(Tabular::SET_PWIDTH, width);
        }
 
-       // When there is a header but no first header, set the first header
-       // as empty . Otherwise longtable's caption handling would be broken,
-       // see bug 6057.
-       if (tabular_.haveLTHead() && !tabular_.haveLTFirstHead())
-               set(Tabular::SET_LTFIRSTHEAD, "empty");
-
        /* DO WE NEED THIS?
        switch (topspaceCO->currentIndex()) {
                case 0: