E52A Use absolute coordinates for start and end location while dragging by ptziegler · Pull Request #699 · eclipse-windowbuilder/windowbuilder · GitHub
[go: up one dir, main page]

Skip to content

Use absolute coordinates for start and end location while dragging#699

Merged
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler:issue697
Jan 27, 2024
Merged

Use absolute coordinates for start and end location while dragging#699
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler:issue697

Conversation

@ptziegler
Copy link
Contributor

When dragging the cursor (e.g. to resize a figure), the corresponding tool would use the absolute coordinate of the cursor as start point, and the relative coordinate as end point when determining whether dragging should be enabled.

This fails once the user scrolled slightly to the right/down. To fix this, simply replace the call to getCurrentInput().getMouseLocation() with getLocation(), which returns the ABSOLUTE mouse location.

Resolves #697

@ptziegler ptziegler added this to the 1.15.0 milestone Jan 26, 2024
When dragging the cursor (e.g. to resize a figure), the corresponding
tool would use the absolute coordinate of the cursor as start point, and
the relative coordinate as end point when determining whether dragging
should be enabled.

This fails once the user scrolled slightly to the right/down. To fix
this, simply replace the call to getCurrentInput().getMouseLocation()
with getLocation(), which returns the ABSOLUTE mouse location.

Resolves eclipse-windowbuilder#697
@ptziegler
Copy link
Contributor Author

Added two test cases to check for horizontal/vertical scrolling to hopefully detect any potential regressions from here on out.

@github-actions
Copy link

Unit Test Results

         4 files           4 suites   1h 22m 37s ⏱️
  7 072 tests   6 882 ✔️ 190 💤 0
28 288 runs  27 524 ✔️ 764 💤 0

Results for commit fa9d8d0.

@ptziegler ptziegler merged commit 407874e into eclipse-windowbuilder:master Jan 27, 2024
@ptziegler ptziegler deleted the issue697 branch September 13, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WindowBuilder ScrollBar Bug

1 participant

0