diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index e02cf64638..5202e789fe 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3847,22 +3847,19 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd, status.setOnOff(convert(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; diff --git a/status.16x b/status.16x index 9de8b26fa0..9127328357 100644 --- a/status.16x +++ b/status.16x @@ -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.