From: Uwe Stöhr Date: Fri, 13 Feb 2009 03:17:01 +0000 (+0000) Subject: InsetTabular.cpp: I was over eager in r28442: there can only be one caption, but... X-Git-Tag: 2.0.0~7231 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=39aae243dc01ac745a7a512a07d5ee8bc2aa0020;p=features.git InsetTabular.cpp: I was over eager in r28442: there can only be one caption, but several header/footer rows git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28474 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index e109a3f21f..cb397a7cc6 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3977,12 +3977,15 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd, status.setOnOff(tabular.getLTNewPage(sel_row_start)); break; + // only one row can be the caption case Tabular::TOGGLE_LTCAPTION: status.setEnabled(sel_row_start == sel_row_end && !tabular.getRowOfLTFirstHead(sel_row_start, dummyltt) && !tabular.getRowOfLTHead(sel_row_start, dummyltt) && !tabular.getRowOfLTFoot(sel_row_start, dummyltt) - && !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt)); + && !tabular.getRowOfLTLastFoot(sel_row_start, dummyltt) + && (!tabular.haveLTCaption() + || tabular.ltCaption(sel_row_start))); status.setOnOff(tabular.ltCaption(sel_row_start)); break;