mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-31 07:45:44 +00:00
Avoid rounding issue when painting selection
This is the same issue that was addressed in the all_sel case at
695b0cc3
. The rounding issue only happens at specific zoom and
jusification values.
Fixes part of #8883.
This commit is contained in:
parent
c9fefd5a2c
commit
71563835c7
@ -640,8 +640,9 @@ void RowPainter::paintSelection() const
|
||||
double x2 = e.pos2x(to);
|
||||
if (x1 > x2)
|
||||
swap(x1, x2);
|
||||
pi_.pain.fillRectangle(int(x + x1), y1, int(x2 - x1), y2 - y1,
|
||||
Color_selection);
|
||||
// the 3rd argument is written like that to avoid rounding issues
|
||||
pi_.pain.fillRectangle(int(x + x1), y1, int(x2 + x) - int(x1 + x),
|
||||
y2 - y1, Color_selection);
|
||||
}
|
||||
x += e.full_width();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user