Skip to content

Commit

Permalink
Allow mouse movement while left click is pressed on a toolbar button
Browse files Browse the repository at this point in the history
Should make the buttons less finnicky
  • Loading branch information
sirjuddington committed Dec 27, 2024
1 parent 5747057 commit 1d1d746
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UI/SToolBar/SToolBarButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ bool SToolBarButton::updateState(int mouse_event)
auto prev_state = state_;

if (mouse_event == 1) // Enter or motion
state_ = State::MouseOver;
state_ = wxGetMouseState().LeftIsDown() ? State::MouseDown : State::MouseOver;
else if (mouse_event == 2) // Leave
state_ = State::Normal;
else if (IsShownOnScreen() && IsEnabled())
Expand Down

0 comments on commit 1d1d746

Please sign in to comment.