]> git.lyx.org Git - lyx.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:51:24 +0000 (13:51 +0200)
commitc9fefd5a2cf5eb97fb23279e5b5e2f4c3a19b22e
treebefd732e0b87094c37222c3178c21e8023825f7b
parent887445537af2a97ee0d248eee163f34a7b525ab8
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.
src/TextMetrics.cpp
src/TextMetrics.h
src/insets/Inset.h