Fix off by one error in tabular draw selection code.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4045 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-04-23 13:14:27 +00:00
parent 0b8be78131
commit 4bf874c30e
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2002-04-23 Juergen Vigna <jug@sad.it>
* insettabular.C (drawCellSelection): fix off by 1 error.
2002-04-22 Juergen Vigna <jug@sad.it>
* insettabular.C (setFont): rewoke full selection if it was asked,

View File

@ -450,7 +450,7 @@ void InsetTabular::drawCellLines(Painter & pain, int x, int baseline,
on_off ? Painter::line_onoffdash : Painter::line_solid);
}
on_off = !tabular->BottomLine(cell);
pain.line(x,baseline + tabular->GetDescentOfRow(row),
pain.line(x, baseline + tabular->GetDescentOfRow(row),
x2, baseline + tabular->GetDescentOfRow(row),
on_off ? LColor::tabularonoffline : LColor::tabularline,
on_off ? Painter::line_onoffdash : Painter::line_solid);
@ -491,8 +491,8 @@ void InsetTabular::drawCellSelection(Painter & pain, int x, int baseline,
if ((column >= cs) && (column <= ce) && (row >= rs) && (row <= re)) {
int w = tabular->GetWidthOfColumn(cell);
int h = tabular->GetAscentOfRow(row) + tabular->GetDescentOfRow(row);
pain.fillRectangle(x, baseline - tabular->GetAscentOfRow(row),
int h = tabular->GetAscentOfRow(row) + tabular->GetDescentOfRow(row)-1;
pain.fillRectangle(x, baseline - tabular->GetAscentOfRow(row) + 1,
w, h, LColor::selection);
}
}