Fix bug #8166: Crash on clicking away from empty last paragraph

This reverts the previous fix in [0a33374c/lyxgit] and fixes it
differently.

We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
This commit is contained in:
Vincent van Ravesteijn 2012-05-23 08:02:40 +02:00
parent 0a33374c0d
commit d20cb73b87

View File

@ -2201,8 +2201,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
// Notify left insets
if (cur != old) {
bool badcursor = old.fixIfBroken() || cur.fixIfBroken()
|| notifyCursorLeavesOrEnters(old, cur);
bool badcursor = old.fixIfBroken() | cur.fixIfBroken();
badcursor |= notifyCursorLeavesOrEnters(old, cur);
if (badcursor)
cursor().fixIfBroken();
}