mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
moveColumn now also swaps column_info
For example, width and alignment are now swapped. Same for moveRow.
This commit is contained in:
parent
76e1f16f8f
commit
9ca242e5bf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user