Fix wrong painting of lines right of multicol

We should skip the other cells that are part of the multicolumn before we find the cell right to the current one.

Fixes-bug: #8082
This commit is contained in:
Vincent van Ravesteijn 2014-02-05 21:30:04 +01:00
parent 690cdcdac5
commit a6fce04f39

View File

@ -3788,9 +3788,13 @@ void InsetTabular::drawCellLines(PainterInfo & pi, int x, int y,
// Right // Right
x -= tabular.interColumnSpace(cell); x -= tabular.interColumnSpace(cell);
col_type next_cell_col = col + 1;
while (next_cell_col < tabular.ncols()
&& tabular.isMultiColumn(tabular.cellIndex(row, next_cell_col)))
next_cell_col++;
drawline = tabular.rightLine(cell) drawline = tabular.rightLine(cell)
|| (col + 1 < tabular.ncols() || (next_cell_col < tabular.ncols()
&& tabular.leftLine(tabular.cellIndex(row, col + 1))); && tabular.leftLine(tabular.cellIndex(row, next_cell_col)));
pi.pain.line(x + w, y, x + w, y + h, pi.pain.line(x + w, y, x + w, y + h,
drawline ? linecolor : gridcolor, drawline ? linecolor : gridcolor,
drawline ? Painter::line_solid : Painter::line_onoffdash); drawline ? Painter::line_solid : Painter::line_onoffdash);