]> git.lyx.org Git - lyx.git/commitdiff
Fix border when inserting column (#10538, #9306)
authorScott Kostyshak <skostysh@lyx.org>
Sun, 4 Jun 2017 19:06:18 +0000 (15:06 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sun, 4 Jun 2017 19:24:10 +0000 (15:24 -0400)
When inserting a column in tabular, the border of the new column
should be copied from the border of the (previously) right-most
column.

Also remove a redundant line. The line

    setRightLine(i, true);

was only reached if rightLine(i) was true.

Patch from Daniel Ramöller.

src/insets/InsetTabular.cpp

index 7a94ebf520af09b1ac8a83a526fb21662c2c7968..a0a249070124e911e1010a95c18da76beeec6d8f 100644 (file)
@@ -878,8 +878,8 @@ void Tabular::insertColumn(col_type const col, bool copy)
                setBottomLine(i, bottomLine(j));
                setTopLine(i, topLine(j));
                setLeftLine(i, leftLine(j));
+               setRightLine(i, rightLine(j));
                if (rightLine(i) && rightLine(j)) {
-                       setRightLine(i, true);
                        setRightLine(j, false);
                }
                if (buffer().params().track_changes)