]> git.lyx.org Git - features.git/commit
Fix bad cursor positioning when entering an inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Jun 2017 09:35:05 +0000 (11:35 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 12 Jun 2017 11:57:46 +0000 (13:57 +0200)
commit04efc84abceb49e2042e357583a84b07847c1a5a
tree945876b0089a70f0b0258130e8a684f3a2be46a0
parent42facddf55c7f24fc37f646b5f850bf91485d404
Fix bad cursor positioning when entering an inset

The test added at 359aef92 was incorrect. Actually, Inset::editXY
returns the inset when it is edited and also when it is not, which
can be confusing. So if we are unlucky and the slices positions in the
text area and in the inner inset match, the code below triggers and
many bad things can happen.

Also improve the documentation of Inset::editXY and TextMetrics::editXY.

Fixes #10691.

(cherry picked from commit c9fefd5a2cf5eb97fb23279e5b5e2f4c3a19b22e)
src/TextMetrics.cpp
src/TextMetrics.h
src/insets/Inset.h
status.22x