From: Martin Vermeer Date: Fri, 3 Feb 2006 17:31:19 +0000 (+0000) Subject: Fix to 2249 (cursor mathed positioning) X-Git-Tag: 1.6.10~13641 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=26cae2254e01c42e4c52c15b1cd51d9ee716ef43;p=lyx.git Fix to 2249 (cursor mathed positioning) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10806 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 5c1dcb8988..b069f4e5e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-02-03 Martin Vermeer + + * cursor.C (bruteFind2): convert relative to absolute co-ordinates + for correct in-mathed positioning + 2006-02-03 Martin Vermeer * rowpainter.C (paintForeignMark): fix foreign blue line under diff --git a/src/cursor.C b/src/cursor.C index de6463b518..a489b26b51 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -97,7 +97,12 @@ namespace { for (size_t i = 0; ; ++i) { int xo; int yo; - it.inset().cursorPos(it.top(), c.boundary() && ((i+1) == it.depth()), xo, yo); + InsetBase const * inset = &it.inset(); + Point o = theCoords.getInsets().xy(inset); + inset->cursorPos(it.top(), c.boundary(), xo, yo); + // Convert to absolute + xo += o.x_; + yo += o.y_; double d = (x - xo) * (x - xo) + (y - yo) * (y - yo); // '<=' in order to take the last possible position // this is important for clicking behind \sum in e.g. '\sum_i a'