From a19557baf76c7e2fd1c75f1d415b9719ab68cb4e Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 22 Feb 2008 12:27:56 +0000 Subject: [PATCH] Text::setCursor(): make sure an update is asked if the current cursor is not visible. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23128 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Text2.cpp b/src/Text2.cpp index a4f78271a4..fff739ed47 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -525,9 +525,11 @@ void Text::insertStringAsParagraphs(Cursor & cur, docstring const & str) bool Text::setCursor(Cursor & cur, pit_type par, pos_type pos, bool setfont, bool boundary) { + TextMetrics const & tm = cur.bv().textMetrics(this); + bool const update_needed = !tm.has(par); Cursor old = cur; setCursorIntern(cur, par, pos, setfont, boundary); - return cur.bv().checkDepm(cur, old); + return cur.bv().checkDepm(cur, old) || update_needed; } -- 2.39.2