Skip to content
Commit 5277776d authored by rk flx's avatar rk flx
Browse files

Avoid cursor glitch after trying to drag an image onto itself

Summary:
Before showing the cursor for dragging an image in {nav View} mode, the
`ClosedHandCursor` for panning is shown due to `startDragDistance()`.
This can be observed when slowly starting to drag. Once the user
released the mouse button within the bounds of the view and thus
finished the drag, the `ClosedHandCursor` was still shown, while
`OpenHandCursor` would have been the correct cursor to display.

`qDebug()` shows that the cursor is correctly (re)set, but somehow the
change takes effect only after moving the mouse again. A workaround
which seems to fix the problem is to reset the panning cursor before
initiating the drag, which then sets and resets the dragging cursor
correctly.

Depends on D13725

Test Plan:
Slowly initiate a drag so the `ClosedHandCursor` is shown. Release the
mouse button without moving the mouse, and observe that the cursor
correctly resets to `OpenHandCursor`. There should be no additional
flickering during the whole operation.

Reviewers: #gwenview, huoni

Reviewed By: #gwenview, huoni

Subscribers: huoni

Differential Revision: https://phabricator.kde.org/D13726
parent 1bd31c9e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment