mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
GuiTabular.cpp: fix #6057
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30422 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
341ac91738
commit
4b55ed8202
@ -822,15 +822,20 @@ void GuiTabular::updateContents()
|
||||
// first header can only be suppressed when there is a header
|
||||
firstheaderNoContentsCB->setEnabled(tabular_.haveLTHead()
|
||||
&& !tabular_.haveLTFirstHead());
|
||||
|
||||
//firstheaderStatusCB->setEnabled(
|
||||
// !firstheaderNoContentsCB->isChecked());
|
||||
// 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());
|
||||
|
||||
headerBorderAboveCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD));
|
||||
headerBorderBelowCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD));
|
||||
headerStatusCB->setEnabled(funcEnabled(Tabular::SET_LTHEAD));
|
||||
|
||||
footerBorderAboveCB->setEnabled(funcEnabled(Tabular::SET_LTFOOT));
|
||||
footerBorderBelowCB->setEnabled(funcEnabled(Tabular::SET_LTFOOT));
|
||||
footerStatusCB->setEnabled(funcEnabled(Tabular::SET_LTFOOT));
|
||||
|
||||
lastfooterBorderAboveCB->setEnabled(
|
||||
funcEnabled(Tabular::SET_LTLASTFOOT));
|
||||
lastfooterBorderBelowCB->setEnabled(
|
||||
@ -865,11 +870,8 @@ 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)
|
||||
&& !firstheaderNoContentsCB->isChecked());
|
||||
funcEnabled(Tabular::SET_LTFIRSTHEAD));
|
||||
firstheaderStatusCB->setChecked(row_set);
|
||||
if (ltt.set && (!ltt.empty || !use_empty)) {
|
||||
firstheaderBorderAboveCB->setChecked(ltt.topDL);
|
||||
@ -879,10 +881,6 @@ 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);
|
||||
@ -974,6 +972,12 @@ 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:
|
||||
|
Loading…
Reference in New Issue
Block a user