]> git.lyx.org Git - features.git/commitdiff
Temporally fix #7321 until a better solution is found. The auto scrolling is very...
authorAbdelrazak Younes <younes@lyx.org>
Sun, 13 Mar 2011 16:41:47 +0000 (16:41 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 13 Mar 2011 16:41:47 +0000 (16:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37916 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.cpp

index 61a40a0f37f5a8767a1e6e2b2100a030e2437890..880706eb366aa3d3153e4ce3d45ed4564c94317a 100644 (file)
@@ -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<pit_type, const ParagraphMetrics *> p = up ? tm.first() : tm.last();
        ParagraphMetrics const & pm = *p.second;