I think the attached fix leads to more intuitive results for added table borders.

This solves one strange case:
1. create a new table (with the default borders, in particular the last row has the borders |c|)
2. add a column after the last most right) column

Actual result:
- The last two rows have the borders |c||c

Expected result:
- They have the borders |c|c|

I also removed a redundant line:

To set a right border, i.e. setRightLine(i, true), can be removed because it is set only if there is already a right border, i.e. rightLine(i).
From 08f5e87fed92776ab9a2e7070416e0f96c57cb66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ram=C3=83=C2=B6ller?= <d....@web.de>
Date: Tue, 18 Oct 2016 20:55:49 +0200
Subject: [PATCH] Fixes vertical table border for added column.

 src/insets/InsetTabular.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 4df9232..82e1bd6 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -877,8 +877,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)

Reply via email to