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
Please register or sign in to comment