]> git.lyx.org Git - features.git/commitdiff
InsetTabular.cpp: I was over eager in r28442: there can only be one caption, but...
authorUwe Stöhr <uwestoehr@web.de>
Fri, 13 Feb 2009 03:17:01 +0000 (03:17 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Fri, 13 Feb 2009 03:17:01 +0000 (03:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28474 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index e109a3f21f3d3aefe43a7d3fd788fb45da0c9940..cb397a7cc64856dbf14a17ac30ab2bf400baab0f 100644 (file)
@@ -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;