From 26cae2254e01c42e4c52c15b1cd51d9ee716ef43 Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Fri, 3 Feb 2006 17:31:19 +0000 Subject: [PATCH] Fix to 2249 (cursor mathed positioning) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10806 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/cursor.C | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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' -- 2.39.5