From 24d2120dab440562478813452dac880cf6c9fcf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matox?= Date: Sun, 12 Aug 2007 14:02:48 +0000 Subject: [PATCH] Second part of bug 580, avoid that lyx produces wrong files git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19457 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 614ced6253..c3e39f1aad 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -721,8 +721,15 @@ void Tabular::deleteColumn(col_type const column) return; column_info.erase(column_info.begin() + column); - for (row_type i = 0; i < rows_; ++i) + for (row_type i = 0; i < rows_; ++i) { + // Care about multicolumn cells + if (column + 1 < columns_ && + cell_info[i][column].multicolumn == CELL_BEGIN_OF_MULTICOLUMN && + cell_info[i][column + 1].multicolumn == CELL_PART_OF_MULTICOLUMN) { + cell_info[i][column + 1].multicolumn = CELL_BEGIN_OF_MULTICOLUMN; + } cell_info[i].erase(cell_info[i].begin() + column); + } --columns_; fixCellNums(); }