]> git.lyx.org Git - features.git/commitdiff
InsetTabular.cpp: fix #7000
authorUwe Stöhr <uwestoehr@web.de>
Mon, 1 Nov 2010 04:30:06 +0000 (04:30 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Mon, 1 Nov 2010 04:30:06 +0000 (04:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35957 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index 4109f8471dfcc5f5c30c86b820fb7ce80613578c..28be8e9aabc27c09f63a66b45c5e7e2608af8670 100644 (file)
@@ -1657,8 +1657,17 @@ void Tabular::unsetMultiColumn(idx_type cell)
        row_type const row = cellRow(cell);
        col_type const col = cellColumn(cell);
        row_type const span = columnSpan(cell);
-       for (col_type c = 0; c < span; ++c)
+       for (col_type c = 0; c < span; ++c) {
+               // in the table dialog the lines are set in every case
+               // when unsetting a multicolumn this leads to an additional right
+               // line for every cell that was part of the former multicolumn cell,
+               // except if the cell is in the last column
+               // therefore remove this line
+               if (cell_info[row][col + c].multicolumn = CELL_BEGIN_OF_MULTICOLUMN
+                       && (col + c) < (col + span - 1))
+                       cell_info[row][col + c].right_line = false;
                cell_info[row][col + c].multicolumn = CELL_NORMAL;
+       }
        updateIndexes();
 }