mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 22:14:35 +00:00
try to correct x position where curosr drops of inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5075 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
42d9dbd0e5
commit
6ac158896b
@ -670,12 +670,22 @@ void MathCursor::handleNest(MathAtom const & a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathCursor::getPos(int & x, int & y)
|
void MathCursor::getPos(int & x, int & y) const
|
||||||
{
|
{
|
||||||
par()->getPos(idx(), pos(), x, y);
|
par()->getPos(idx(), pos(), x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int MathCursor::targetX() const
|
||||||
|
{
|
||||||
|
if (targetx_ != -1)
|
||||||
|
return targetx_;
|
||||||
|
int x = 0, y = 0;
|
||||||
|
getPos(x, y);
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
MathInset * MathCursor::par() const
|
MathInset * MathCursor::par() const
|
||||||
{
|
{
|
||||||
return cursor().par_;
|
return cursor().par_;
|
||||||
|
@ -102,7 +102,9 @@ public:
|
|||||||
/// in pixels from top of screen
|
/// in pixels from top of screen
|
||||||
void setPos(int x, int y);
|
void setPos(int x, int y);
|
||||||
/// in pixels from top of screen
|
/// in pixels from top of screen
|
||||||
void getPos(int & x, int & y);
|
void getPos(int & x, int & y) const;
|
||||||
|
/// in pixels from left of screen
|
||||||
|
int targetX() const;
|
||||||
/// current inset
|
/// current inset
|
||||||
MathInset * par() const;
|
MathInset * par() const;
|
||||||
/// return the next enclosing grid inset and the cursor's index in it
|
/// return the next enclosing grid inset and the cursor's index in it
|
||||||
|
Loading…
Reference in New Issue
Block a user