]> git.lyx.org Git - features.git/commitdiff
Fix #8180: Page break on current row can't be unchecked.
authorPavel Sanda <sanda@lyx.org>
Thu, 31 May 2012 11:56:07 +0000 (13:56 +0200)
committerPavel Sanda <sanda@lyx.org>
Thu, 31 May 2012 11:56:07 +0000 (13:56 +0200)
Patch from John Tapsell

src/frontends/qt4/GuiTabular.cpp
src/insets/InsetTabular.cpp
src/insets/InsetTabular.h

index 8a14cb709392eff35519eab62ef44201f6613c78..79706d41c5c01cdd41acfcded4118884bf90ce56 100644 (file)
@@ -580,6 +580,8 @@ docstring GuiTabular::dialogToParams() const
        //
        if (newpageCB->isChecked())
                setParam(param_str, Tabular::SET_LTNEWPAGE);
+    else
+               setParam(param_str, Tabular::UNSET_LTNEWPAGE);
        //
        if (captionStatusCB->isChecked())
                setParam(param_str, Tabular::SET_LTCAPTION);
index 00ee719d81a6bf7651c4a197e53a7e135fa768ae..8e796dbbf9561832593ecaab76b0c3fe7fe86cf1 100644 (file)
@@ -165,6 +165,7 @@ TabularFeature tabularFeature[] =
        { Tabular::SET_LTLASTFOOT, "set-ltlastfoot", true },
        { Tabular::UNSET_LTLASTFOOT, "unset-ltlastfoot", true },
        { Tabular::SET_LTNEWPAGE, "set-ltnewpage", false },
+       { Tabular::UNSET_LTNEWPAGE, "unset-ltnewpage", false },
        { Tabular::TOGGLE_LTCAPTION, "toggle-ltcaption", false },
        { Tabular::SET_LTCAPTION, "set-ltcaption", false },
        { Tabular::UNSET_LTCAPTION, "unset-ltcaption", false },
@@ -4640,6 +4641,9 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                case Tabular::SET_LTNEWPAGE:
                        status.setOnOff(tabular.getLTNewPage(sel_row_start));
                        break;
+               case Tabular::UNSET_LTNEWPAGE:
+                       status.setOnOff(!tabular.getLTNewPage(sel_row_start));
+                       break;
 
                // only one row in head/firsthead/foot/lasthead can be the caption
                // and a multirow cannot be set as caption
@@ -5657,8 +5661,10 @@ void InsetTabular::tabularFeatures(Cursor & cur,
                tabular.setLTFoot(row, flag, ltt, true);
                break;
 
+       case Tabular::UNSET_LTNEWPAGE:
+               flag = false;
        case Tabular::SET_LTNEWPAGE:
-               tabular.setLTNewPage(row, !tabular.getLTNewPage(row));
+               tabular.setLTNewPage(row, flag);
                break;
 
        case Tabular::SET_LTCAPTION: {
index e7650009ecb197a91021c1914aa7a2921f965c4d..80958cc8a856cbb24938d070c2913356b739b2f8 100644 (file)
@@ -233,6 +233,7 @@ public:
                UNSET_LTLASTFOOT,
                ///
                SET_LTNEWPAGE,
+               UNSET_LTNEWPAGE,
                ///
                TOGGLE_LTCAPTION,
                ///