On 13-3-2011 17:41, [email protected] wrote:
Author: younes
Date: Sun Mar 13 17:41:47 2011
New Revision: 37916
URL: http://www.lyx.org/trac/changeset/37916

Log:
Temporally fix #7321 until a better solution is found. The auto scrolling is 
very bad but at least it does not crash nor assert.

Modified:
    lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp   Sun Mar 13 17:38:36 
2011        (r37915)
+++ lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp   Sun Mar 13 17:41:47 
2011        (r37916)
@@ -943,9 +943,11 @@

        // 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);


Abdel,

Why is math a problem ? What we do here is not fundamentally different from TextMetrics::editXY and that works also for math.

Can you comment somewhat more on this ?

Vincent

Reply via email to