]> git.lyx.org Git - features.git/commitdiff
fix cursor coordinates in math insets [bug 2124]
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 10 Nov 2005 08:28:06 +0000 (08:28 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 10 Nov 2005 08:28:06 +0000 (08:28 +0000)
(which is a fix-the-fix for bug 2094)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10598 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/bufferview_funcs.C

index 00f542fc6cbff32b8228093592327d84cebdfa37..32fb5ab833dcfd5e48b6ace2640f6d531d08760e 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-10  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
+
+       * bufferview_funcs.C (coordOffset): fix the fix for bug 2094, as
+       math insets do not return a proper editable() state yet (bug 2124).
+
 2005-11-07  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * BufferView_pimpl.[Ch]: Fix bug 1814: better scroll behaviour for 
index 4dcf38d8225f0ffd2da6f57302a1cf5c97997bf5..41f94771b80c9072ec752e69865799a1b6276b64 100644 (file)
@@ -163,7 +163,10 @@ Point coordOffset(DocIterator const & dit, bool boundary)
                CursorSlice const & sl = dit[i];
                int xx = 0;
                int yy = 0;
-               if (sl.inset().editable() == InsetBase::HIGHLY_EDITABLE)
+               //FIXME: the check for asMathInset() shouldn't be necessary
+               // but math insets do not return a sensible editable() state yet.
+               if (sl.inset().asMathInset() 
+                   || sl.inset().editable() == InsetBase::HIGHLY_EDITABLE)
                        sl.inset().cursorPos(sl, boundary && ((i+1) == dit.depth()), xx, yy);
                x += xx;
                y += yy;