Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse wheel zoom of plot also scrolls pane #411

Closed
sparsonslab opened this issue Sep 1, 2020 · 1 comment
Closed

Mouse wheel zoom of plot also scrolls pane #411

sparsonslab opened this issue Sep 1, 2020 · 1 comment
Labels
ETS Backlog Good issue for ETS team members to look at type: bug

Comments

@sparsonslab
Copy link

sparsonslab commented Sep 1, 2020

Description

  • Given: a Chaco plot with ZoomTool, inside a scrollable pane.
  • When: the user zooms the plot with a mouse-wheel action.
  • Then: the pane is simultaneously scrolled.

Possible Origin

@corranwebster had some suggestions:

Possibly a bug in the ZoomTool or Enable. When a tool handles an interaction, it should flag the Enable event object as having been handled (there is a trait on it for that) and then that should also be conveyed to the underlying toolkit.
I suspect that one of these two things is not being done for the mouse wheel event.

Looks like it might be a bug in the enable.qt4.base_window module: according to https://doc.qt.io/qt-5/qwidget.html#wheelEvent it looks like we might need to call event.accept() if the event is handled or event.ignore() if not (which can be detected by the return value from handle_mouse_event.

When the application window height is reduced such that the pane becomes vertically scrollable, using the mouse wheel on a plot can cause two actions to occur simultaneously:

  1. The pane scrolls up or down.
  2. The intended mouse wheel action for the plot.

leading to a frustrating UX. At present:

  • The vertical scrollbar (and thus this bug) only appears when the application window is reduced to less than ~2/3 of the default height. This threshold depends on the layout of each tab in the pane, however, so could change.

Below is a description of what happens from @nicolasap-dm of this occurring

Scrolling the mouse wheel while hovering the pane area now scrolls the area; however, that event is also captured by the ZoomTool when we're hovering one of the tabs. Here, the wires get crossed and we end up scrolling and zooming at the same time.

@corranwebster corranwebster added type: bug ETS Backlog Good issue for ETS team members to look at labels Sep 25, 2020
@rahulporuri
Copy link
Contributor

closing as #552 should have fixed this issue. @sparsonslab if you still see issue with the latest enable (5.0.1), please update/reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ETS Backlog Good issue for ETS team members to look at type: bug
Projects
None yet
Development

No branches or pull requests

3 participants