mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
- InsetTabular.cpp: partly reverting r28441, because I was wrong: it is totally valid to have several rows to be the header and also several rows can have a caption, my own EmebeddedObjects manual has examples for this - stupid me!
Bug 5752 is nevertheless still fixed. - status.16x: add entry git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28443 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0360ab7ff0
commit
b920bcd5a5
@ -3847,22 +3847,19 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
status.setOnOff(convert<int>(argument) == tabular.getUsebox(cur.idx()));
|
||||
break;
|
||||
|
||||
// when a header/footer/caption is set, no other row can be the same
|
||||
// furthermore, every row can only be one thing:
|
||||
// either a footer or header or caption
|
||||
// every row can only be one thing:
|
||||
// either a footer or header or caption
|
||||
case Tabular::SET_LTFIRSTHEAD:
|
||||
status.setEnabled(sel_row_start == sel_row_end
|
||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.ltCaption(sel_row_start)
|
||||
&& (!tabular.haveLTFirstHead()
|
||||
|| tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)));
|
||||
status.setOnOff(tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
||||
&& !tabular.ltCaption(sel_row_start));
|
||||
status.setOnOff(tabular.getRowOfLTFirstHead(sel_row_start, dummyltt));
|
||||
break;
|
||||
|
||||
case Tabular::UNSET_LTFIRSTHEAD:
|
||||
status.setOnOff(!tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
||||
status.setOnOff(!tabular.getRowOfLTFirstHead(sel_row_start, dummyltt));
|
||||
break;
|
||||
|
||||
case Tabular::SET_LTHEAD:
|
||||
@ -3870,9 +3867,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.ltCaption(sel_row_start)
|
||||
&& (!tabular.haveLTHead()
|
||||
|| tabular.getRowOfLTHead(sel_row_start, dummyltt)));
|
||||
&& !tabular.ltCaption(sel_row_start));
|
||||
status.setOnOff(tabular.getRowOfLTHead(sel_row_start, dummyltt));
|
||||
break;
|
||||
|
||||
@ -3885,9 +3880,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.ltCaption(sel_row_start)
|
||||
&& (!tabular.haveLTFoot()
|
||||
|| tabular.getRowOfLTFoot(sel_row_start, dummyltt)));
|
||||
&& !tabular.ltCaption(sel_row_start));
|
||||
status.setOnOff(tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
||||
break;
|
||||
|
||||
@ -3900,14 +3893,12 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.ltCaption(sel_row_start)
|
||||
&& (!tabular.haveLTLastFoot()
|
||||
|| tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)));
|
||||
status.setOnOff(tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
||||
&& !tabular.ltCaption(sel_row_start));
|
||||
status.setOnOff(tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
|
||||
break;
|
||||
|
||||
case Tabular::UNSET_LTLASTFOOT:
|
||||
status.setOnOff(!tabular.getRowOfLTFoot(sel_row_start, dummyltt));
|
||||
status.setOnOff(!tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
|
||||
break;
|
||||
|
||||
case Tabular::SET_LTNEWPAGE:
|
||||
@ -3919,11 +3910,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
&& !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTHead(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTFoot(sel_row_start, dummyltt)
|
||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)
|
||||
// Only the first row can be the caption.
|
||||
&& sel_row_start == 0
|
||||
&& (!tabular.haveLTCaption()
|
||||
|| tabular.ltCaption(sel_row_start)));
|
||||
&& !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
|
||||
status.setOnOff(tabular.ltCaption(sel_row_start));
|
||||
break;
|
||||
|
||||
|
@ -179,6 +179,9 @@ What's new
|
||||
- Speed up editing when the document contains paragraphs with many (>1000)
|
||||
insets (part of bug 4443).
|
||||
|
||||
- Fix the longtable dialog: Now only only one attribute can be set per
|
||||
table row (bug 5752).
|
||||
|
||||
- Set buffer status to changed and record UNDO after modifying insets such
|
||||
as pagebreaks or citations via context menu.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user