mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Improve test in Geometry::covers
Horizontally, the old code would count an extra pixel on the right. The vertical test is not changed, and should be eventually audited. Fixes bug #10468.
This commit is contained in:
parent
22cb573cac
commit
a9c6fb0c19
@ -31,10 +31,8 @@ struct Geometry {
|
||||
|
||||
bool covers(int x, int y) const
|
||||
{
|
||||
return x >= pos.x_
|
||||
&& x <= pos.x_ + dim.wid
|
||||
&& y >= pos.y_ - dim.asc
|
||||
&& y <= pos.y_ + dim.des;
|
||||
return x >= pos.x_ && x < pos.x_ + dim.wid
|
||||
&& y >= pos.y_ - dim.asc && y <= pos.y_ + dim.des;
|
||||
}
|
||||
|
||||
int squareDistance(int x, int y) const
|
||||
|
Loading…
Reference in New Issue
Block a user