fix cursor coordinates in math insets [bug 2124]

(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
This commit is contained in:
Jürgen Spitzmüller 2005-11-10 08:28:06 +00:00
parent 5be7e73fde
commit 3f1d516ac9
2 changed files with 9 additions and 1 deletions

View 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

View 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;