Skip to content

Commit

Permalink
Disable move on double-click
Browse files Browse the repository at this point in the history
Sometimes it could happen that if one double click on a control the
slider "hangs" from then on as the control does not receive a "MousUp"
event and then the follow the mouse without actually holding it down.

This now additionally registers a MouseDoubleClick handler that disable
the move operation.
  • Loading branch information
laeubi committed May 28, 2024
1 parent 33463a7 commit 5bb8fc6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,14 @@ private void addMouseListeners() {
mouseDeltaX = xPosition - e.x;
}
});
addListener(SWT.MouseDoubleClick, e -> {
moving = false;
});

addListener(SWT.MouseUp, e -> {
if(!moving) {
return;
}
moving = false;
mouseDeltaX = 0;
if(movingValue != value) {
Expand Down

0 comments on commit 5bb8fc6

Please sign in to comment.