Author: younes
Date: Sun Mar 13 17:26:03 2011
New Revision: 37913
URL: http://www.lyx.org/trac/changeset/37913

Log:
Trying to fix #7321: SyntheticMouseEvent() only works within text.

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 13:19:47 
2011        (r37912)
+++ lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp   Sun Mar 13 17:26:03 
2011        (r37913)
@@ -943,7 +943,9 @@
 
        // In which paragraph do we have to set the cursor ?
        Cursor & cur = buffer_view_->cursor();
-       TextMetrics const & tm = buffer_view_->textMetrics(cur.text());
+       // 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());
 
        pair<pit_type, const ParagraphMetrics *> p = up ? tm.first() : 
tm.last();
        ParagraphMetrics const & pm = *p.second;

Reply via email to