mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
don't draw invisible things...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3737 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
97ffd5e934
commit
c2072fa890
@ -1224,8 +1224,9 @@ bool MathCursor::bruteFind(int x, int y, int xlow, int xhigh, int ylow, int yhig
|
||||
while (1) {
|
||||
// avoid invalid nesting when selecting
|
||||
if (!selection_ || positionable(it.cursor(), Anchor_)) {
|
||||
int xo = it.position().xpos();
|
||||
int yo = it.position().ypos();
|
||||
MathCursorPos const & top = it.position();
|
||||
int xo = top.xpos();
|
||||
int yo = top.ypos();
|
||||
if (xlow - 2 <= xo && xo <= xhigh + 2 &&
|
||||
ylow - 2 <= yo && yo <= yhigh + 2)
|
||||
{
|
||||
|
@ -74,10 +74,21 @@ void MathXArray::draw(Painter & pain, int x, int y) const
|
||||
//if (drawn_ && x == xo_ && y == yo_)
|
||||
// return;
|
||||
|
||||
//lyxerr << "x: " << x << " y: " << y << " " << pain.workAreaHeight() << endl;
|
||||
|
||||
xo_ = x;
|
||||
yo_ = y;
|
||||
drawn_ = true;
|
||||
|
||||
if (y + descent_ <= 0) // don't draw above the workarea
|
||||
return;
|
||||
if (y - ascent_ >= pain.paperHeight()) // don't draw below the workarea
|
||||
return;
|
||||
if (x + width_ <= 0) // don't draw left of workarea
|
||||
return;
|
||||
if (x >= pain.paperWidth()) // don't draw right of workarea
|
||||
return;
|
||||
|
||||
const_iterator it = begin(), et = end();
|
||||
|
||||
if (it == et) {
|
||||
|
Loading…
Reference in New Issue
Block a user