]> git.lyx.org Git - features.git/commitdiff
Set iy() to the right value if we have an inset on pos which needs a full
authorJürgen Vigna <jug@sad.it>
Thu, 11 Apr 2002 14:22:39 +0000 (14:22 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 11 Apr 2002 14:22:39 +0000 (14:22 +0000)
row display (fix #262).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3971 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text2.C

index 6a0fdd1fe543da77fefb15c9be97ca38acacd8ad..fd3850e39a77f727c2a9ae1b4b8a1ccb3e734c97 100644 (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!
 
index 5b6f639769b9522b6830c4c3c52399631c2884ce..7ce0ae4a61268220ef34512c2d997be4a2c45fb9 100644 (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());
-       cur.iy(cur.y());
+       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);
 }