From 961c3ee574a9f5c573f703ed55ec99370787511d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Vigna?= Date: Thu, 11 Apr 2002 14:22:39 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 2 ++ src/text2.C | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6a0fdd1fe5..fd3850e39a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2002-04-11 Juergen Vigna + * 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! diff --git a/src/text2.C b/src/text2.C index 5b6f639769..7ce0ae4a61 100644 --- a/src/text2.C +++ b/src/text2.C @@ -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); }