From 3fbddfe79be90097b65ea349f51628805303ae99 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 5 Jul 2020 19:07:43 -0400 Subject: [PATCH] Update Hover in MouseMove always (#2294) If moue was down the return killed the hover update so a right-mouse-drag would keep the hover orphaned. Just change an order Closes #2292 --- src/common/gui/CHSwitch2.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/gui/CHSwitch2.cpp b/src/common/gui/CHSwitch2.cpp index d9083fdc3ce..6b0a67903f8 100644 --- a/src/common/gui/CHSwitch2.cpp +++ b/src/common/gui/CHSwitch2.cpp @@ -121,6 +121,11 @@ CMouseEventResult CHSwitch2::onMouseUp(CPoint& where, const CButtonState& button } CMouseEventResult CHSwitch2::onMouseMoved(CPoint& where, const CButtonState& buttons) { + if( doingHover ) + { + calculateHoverValue( where ); + } + if (dragable && ( buttons.getButtonState() )) { auto mouseableArea = getMouseableArea(); @@ -151,10 +156,6 @@ CMouseEventResult CHSwitch2::onMouseMoved(CPoint& where, const CButtonState& but return kMouseEventHandled; } - if( doingHover ) - { - calculateHoverValue( where ); - } return kMouseEventNotHandled; }