Correct painting of a fully selected tabular cell.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27630 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2008-11-18 22:35:02 +00:00
parent 2d1e0ffabd
commit 912979d2db

View File

@ -3104,8 +3104,10 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
//resetPos(cur); //resetPos(cur);
bool const full_cell_selected = isCellSelected(cur,
tabular.cellRow(cur.idx()), tabular.cellColumn(cur.idx()));
if (cur.selIsMultiCell()) { if (cur.selIsMultiCell() || full_cell_selected) {
y -= tabular.rowAscent(0); y -= tabular.rowAscent(0);
for (row_type j = 0; j < tabular.row_info.size(); ++j) { for (row_type j = 0; j < tabular.row_info.size(); ++j) {
int const a = tabular.rowAscent(j); int const a = tabular.rowAscent(j);
@ -3119,8 +3121,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
tabular.cellIndex(j, i); tabular.cellIndex(j, i);
int const w = tabular.columnWidth(cell); int const w = tabular.columnWidth(cell);
if (isCellSelected(cur, j, i)) if (isCellSelected(cur, j, i))
pi.pain.fillRectangle(xx, y, w, h, pi.pain.fillRectangle(xx, y, w, h, Color_selection);
Color_selection);
xx += w; xx += w;
} }
y += h; y += h;