commit 9ca242e5bf1919e510c99f315e3c2506509e2b1d
Author: Scott Kostyshak <[email protected]>
Date:   Tue Feb 18 13:39:45 2014 -0500

    moveColumn now also swaps column_info
    
    For example, width and alignment are now swapped.
    
    Same for moveRow.

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index e52b762..51f579e 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -780,6 +780,8 @@ void Tabular::moveColumn(col_type col, ColDirection 
direction)
        if (direction == Tabular::LEFT)
                col = col - 1;
 
+       std::swap(column_info[col], column_info[col + 1]);
+
        for (row_type r = 0; r < nrows(); ++r) {
                std::swap(cell_info[r][col], cell_info[r][col + 1]);
                std::swap(cell_info[r][col].left_line, cell_info[r][col + 
1].left_line);
@@ -802,6 +804,8 @@ void Tabular::moveRow(row_type row, RowDirection direction)
        if (direction == Tabular::UP)
                row = row - 1;
 
+       std::swap(row_info[row], row_info[row + 1]);
+
        for (col_type c = 0; c < ncols(); ++c) {
                std::swap(cell_info[row][c], cell_info[row + 1][c]);
                std::swap(cell_info[row][c].top_line, cell_info[row + 
1][c].top_line);

Reply via email to