On 28-3-2011 10:29, Abdelrazak Younes wrote:
On 03/27/2011 09:16 PM, Vincent van Ravesteijn wrote:
On 13-3-2011 17:41, you...@lyx.org 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.
Sure but we assume in the following code that we have a text inset.
I mean: this and the rest of the code basically does the same as editXY.
Why does this code assume we have a text inset then ? Or is there no
fundamental reason to not do the same as in editXY ?
Vincent