Set iy() to the right value if we have an inset on pos which needs a full

row display (fix #262).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3971 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-04-11 14:22:39 +00:00
parent fe27c7bca9
commit 961c3ee574
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2002-04-11 Juergen Vigna <jug@sad.it>
* text2.C (setCursorFromCoordinates): set iy to the right value.
* buffer.C (parseSingleLyXformat2Token): reset font after read of
an old float_type as this was the case in the old code!

View File

@ -2249,7 +2249,16 @@ void LyXText::setCursorFromCoordinates(BufferView * bview, LyXCursor & cur,
cur.pos(row->pos() + column);
cur.x(x);
cur.y(y + row->baseline());
Inset * ins;
if (row->next() && cur.pos() &&
cur.par()->getChar(cur.pos()) == Paragraph::META_INSET &&
(ins=cur.par()->getInset(cur.pos())) &&
(ins->needFullRow() || ins->display()))
{
cur.iy(y + row->height() + row->next()->baseline());
} else {
cur.iy(cur.y());
}
cur.row(row);
cur.boundary(bound);
}