mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Table dialog: Fix enabling/disabling of first header and last footer
check boxes. This should fix bug #7008 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35993 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
90eb28d85a
commit
3142a62c7a
@ -197,10 +197,7 @@ void GuiTabular::checkEnabled()
|
||||
headerBorderBelowCB->setEnabled(longtabular
|
||||
&& headerStatusCB->isChecked());
|
||||
|
||||
// first header can only be suppressed when there is a header
|
||||
// FIXME: old code also checked for
|
||||
// tabular.haveLTHead() && !tabular.haveLTFirstHead());
|
||||
firstheaderNoContentsCB->setEnabled(longtabular);
|
||||
firstheaderNoContentsCB->setEnabled(longtabular && firstheader_suppressable_);
|
||||
// check if setting a first header is allowed
|
||||
// additionally check firstheaderNoContentsCB because when this is
|
||||
// the case a first header makes no sense
|
||||
@ -217,10 +214,7 @@ void GuiTabular::checkEnabled()
|
||||
footerBorderBelowCB->setEnabled(longtabular
|
||||
&& footerBorderAboveCB->isChecked());
|
||||
|
||||
// last footer can only be suppressed when there is a footer
|
||||
// FIXME: old code also checked for
|
||||
// tabular.haveLTFoot() && !tabular.haveLTLastFoot());
|
||||
lastfooterNoContentsCB->setEnabled(longtabular);
|
||||
lastfooterNoContentsCB->setEnabled(longtabular && lastfooter_suppressable_);
|
||||
// check if setting a last footer is allowed
|
||||
// additionally check lastfooterNoContentsCB because when this is
|
||||
// the case a last footer makes no sense
|
||||
@ -855,6 +849,13 @@ void GuiTabular::paramsToDialog(Inset const * inset)
|
||||
}
|
||||
newpageCB->setChecked(tabular.getLTNewPage(row));
|
||||
|
||||
// first header can only be suppressed when there is a header
|
||||
firstheader_suppressable_ = tabular.haveLTHead()
|
||||
&& !tabular.haveLTFirstHead();
|
||||
// last footer can only be suppressed when there is a footer
|
||||
lastfooter_suppressable_ = tabular.haveLTFoot()
|
||||
&& !tabular.haveLTLastFoot();
|
||||
|
||||
// after setting the features, check if they are enabled
|
||||
checkEnabled();
|
||||
}
|
||||
|
@ -53,6 +53,10 @@ private:
|
||||
void setWidthAndAlignment();
|
||||
///
|
||||
bool funcEnabled(Tabular::Feature f) const;
|
||||
///
|
||||
bool firstheader_suppressable_;
|
||||
///
|
||||
bool lastfooter_suppressable_;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
Loading…
Reference in New Issue
Block a user