]> git.lyx.org Git - features.git/commitdiff
Tabular dialog: fix border setting/unsetting bug.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 19 Feb 2010 08:20:58 +0000 (08:20 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 19 Feb 2010 08:20:58 +0000 (08:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33505 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiTabular.cpp

index 4d3e3e6c11dab527901c8e7fd9312ab4d80349d4..d014d5dc73c485b7e988d816f3bc79a489a78902 100644 (file)
@@ -376,15 +376,16 @@ docstring GuiTabular::dialogToParams() const
        else if (!borders->getTop() && !borders->getBottom() && !borders->getLeft()
                && !borders->getRight())
                setParam(param_str, Tabular::UNSET_ALL_LINES);
-       else if (borders->getLeft())
-               setParam(param_str, Tabular::TOGGLE_LINE_LEFT);
-       else if (borders->getRight())
-               setParam(param_str, Tabular::TOGGLE_LINE_RIGHT);
-       else if (borders->getTop())
-               setParam(param_str, Tabular::TOGGLE_LINE_TOP);
-       else if (borders->getBottom())
-               setParam(param_str, Tabular::TOGGLE_LINE_BOTTOM);
-
+       else {
+               if (borders->getLeft())
+                       setParam(param_str, Tabular::TOGGLE_LINE_LEFT);
+               if (borders->getRight())
+                       setParam(param_str, Tabular::TOGGLE_LINE_RIGHT);
+               if (borders->getTop())
+                       setParam(param_str, Tabular::TOGGLE_LINE_TOP);
+               if (borders->getBottom())
+                       setParam(param_str, Tabular::TOGGLE_LINE_BOTTOM);
+       }
 
        // apply the special alignment
        string special = fromqstr(specialAlignmentED->text());