]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
Fix bug #7983: Do not modify params before we know we have
[lyx.git] / src / insets / InsetTabular.cpp
index 01ee12c516513731fb0d65f5fecd49d49e046bd7..dca6a18c3d021f92c48e63c5d2c5283a2adb7de9 100644 (file)
@@ -4610,6 +4610,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
 
                case Tabular::UNSET_LTFIRSTHEAD:
+                       status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
                        status.setOnOff(!tabular.getRowOfLTFirstHead(sel_row_start, dummyltt));
                        break;
 
@@ -4619,6 +4620,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
 
                case Tabular::UNSET_LTHEAD:
+                       status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
                        status.setOnOff(!tabular.getRowOfLTHead(sel_row_start, dummyltt));
                        break;
 
@@ -4628,6 +4630,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
 
                case Tabular::UNSET_LTFOOT:
+                       status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
                        status.setOnOff(!tabular.getRowOfLTFoot(sel_row_start, dummyltt));
                        break;
 
@@ -4637,6 +4640,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
 
                case Tabular::UNSET_LTLASTFOOT:
+                       status.setEnabled(sel_row_start == sel_row_end && !tabular.ltCaption(sel_row_start));
                        status.setOnOff(!tabular.getRowOfLTLastFoot(sel_row_start, dummyltt));
                        break;