From: Richard Heck Date: Wed, 7 May 2008 19:20:01 +0000 (+0000) Subject: Partially fix an annoying hover problem, viz: InsetCollapsable buttons don't get... X-Git-Tag: 1.6.10~4860 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b90b295e227a24b24ac82999804f90acc33b58db;p=features.git Partially fix an annoying hover problem, viz: InsetCollapsable buttons don't get `unhovered' if you collapse them (via Ctrl-I) when the mouse is inside the inset. I often seem to end up with several `hovered' buttons. There is probably a better solution somewhere, but it's not obvious what it is, and this solution doesn't do anything terrible. It leaves unaddressed the fact that the button does not get `hovered' if you open an inset via Ctrl-I, and then the mouse ends up inside it, and now the button will get `unhovered' whenver you collapse it, even if the mouse ends up over the button. But (i) my attempts to deal with these cases failed, (ii) they're not very annoying, (iii) they get `fixed' as soon as you move the mouse, and (iv) I'm not sure how complicated it's worth making this. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24662 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 1a65c58001..c255d24709 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -755,8 +755,10 @@ void InsetCollapsable::setStatus(Cursor & cur, CollapseStatus status) { status_ = status; setButtonLabel(); - if (status_ == Collapsed) + if (status_ == Collapsed) { cur.leaveInset(*this); + mouse_hover_ = false; + } }