Skip to content

Commit

Permalink
Update Hover in MouseMove always (#2294)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
baconpaul authored Jul 5, 2020
1 parent c4aab24 commit 3fbddfe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/common/gui/CHSwitch2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -151,10 +156,6 @@ CMouseEventResult CHSwitch2::onMouseMoved(CPoint& where, const CButtonState& but
return kMouseEventHandled;
}

if( doingHover )
{
calculateHoverValue( where );
}

return kMouseEventNotHandled;
}
Expand Down

0 comments on commit 3fbddfe

Please sign in to comment.