From a12e81fe064222ab169a59055f7e20fd57e46cd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Thu, 12 Feb 2009 03:02:34 +0000 Subject: [PATCH] GuiTabular.cpp, InsetTabular.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5773 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28464 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiTabular.cpp | 3 +++ src/insets/InsetTabular.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index f91650d6b8..8661733647 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -816,6 +816,9 @@ void GuiTabular::updateContents() lastfooterStatusCB->setEnabled(funcEnabled(Tabular::SET_LTLASTFOOT) && !lastfooterNoContentsCB->isChecked()); captionStatusCB->setEnabled(funcEnabled(Tabular::TOGGLE_LTCAPTION)); + // When a row is set as longtable caption, it must not be allowed to unset + // that this row is a multicolumn. + multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN)); Tabular::ltType ltt; bool use_empty; diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 4711725213..9b6fe85d61 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3805,7 +3805,10 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd, return true; case Tabular::MULTICOLUMN: - status.setEnabled(sel_row_start == sel_row_end); + // When a row is set as longtable caption, it must not be allowed + // to unset that this row is a multicolumn. + status.setEnabled(sel_row_start == sel_row_end + && !tabular.ltCaption(tabular.cellRow(cur.idx()))); status.setOnOff(tabular.isMultiColumn(cur.idx())); break; -- 2.39.5