From: Abdelrazak Younes Date: Sun, 13 Mar 2011 16:41:47 +0000 (+0000) Subject: Temporally fix #7321 until a better solution is found. The auto scrolling is very... X-Git-Tag: 2.0.0~534 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c9e4d86b4c9183bdd059fd77efc2be6beea6ca7d;p=features.git Temporally fix #7321 until a better solution is found. The auto scrolling is very bad but at least it does not crash nor assert. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37916 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 61a40a0f37..880706eb36 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -943,9 +943,11 @@ void GuiWorkArea::generateSyntheticMouseEvent() // In which paragraph do we have to set the cursor ? Cursor & cur = buffer_view_->cursor(); - // FIXME: we use innerText() because we only know how to handle text. - // so this will not work nicely inside big equation. - TextMetrics const & tm = buffer_view_->textMetrics(cur.innerText()); + // FIXME: we don't know howto handle math. + Text * text = cur.text(); + if (!text) + return; + TextMetrics const & tm = buffer_view_->textMetrics(text); pair p = up ? tm.first() : tm.last(); ParagraphMetrics const & pm = *p.second;