mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
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:
parent
0b8be78131
commit
4bf874c30e
@ -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>
|
2002-04-22 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* insettabular.C (setFont): rewoke full selection if it was asked,
|
* insettabular.C (setFont): rewoke full selection if it was asked,
|
||||||
|
@ -450,8 +450,8 @@ void InsetTabular::drawCellLines(Painter & pain, int x, int baseline,
|
|||||||
on_off ? Painter::line_onoffdash : Painter::line_solid);
|
on_off ? Painter::line_onoffdash : Painter::line_solid);
|
||||||
}
|
}
|
||||||
on_off = !tabular->BottomLine(cell);
|
on_off = !tabular->BottomLine(cell);
|
||||||
pain.line(x,baseline + tabular->GetDescentOfRow(row),
|
pain.line(x, baseline + tabular->GetDescentOfRow(row),
|
||||||
x2, baseline + tabular->GetDescentOfRow(row),
|
x2, baseline + tabular->GetDescentOfRow(row),
|
||||||
on_off ? LColor::tabularonoffline : LColor::tabularline,
|
on_off ? LColor::tabularonoffline : LColor::tabularline,
|
||||||
on_off ? Painter::line_onoffdash : Painter::line_solid);
|
on_off ? Painter::line_onoffdash : Painter::line_solid);
|
||||||
if (!tabular->LeftAlreadyDrawed(cell)) {
|
if (!tabular->LeftAlreadyDrawed(cell)) {
|
||||||
@ -491,8 +491,8 @@ void InsetTabular::drawCellSelection(Painter & pain, int x, int baseline,
|
|||||||
|
|
||||||
if ((column >= cs) && (column <= ce) && (row >= rs) && (row <= re)) {
|
if ((column >= cs) && (column <= ce) && (row >= rs) && (row <= re)) {
|
||||||
int w = tabular->GetWidthOfColumn(cell);
|
int w = tabular->GetWidthOfColumn(cell);
|
||||||
int h = tabular->GetAscentOfRow(row) + tabular->GetDescentOfRow(row);
|
int h = tabular->GetAscentOfRow(row) + tabular->GetDescentOfRow(row)-1;
|
||||||
pain.fillRectangle(x, baseline - tabular->GetAscentOfRow(row),
|
pain.fillRectangle(x, baseline - tabular->GetAscentOfRow(row) + 1,
|
||||||
w, h, LColor::selection);
|
w, h, LColor::selection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user