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
This commit is contained in:
Abdelrazak Younes 2008-02-22 12:27:56 +00:00
parent 2ed1153c8c
commit a19557baf7

View File

@ -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;
}