Do not allow to drag an image onto itself
ClosedPublic

Authored by rkflx on Jun 25 2018, 9:45 PM.

Details

Summary

The combination of 131d25855e11 and 984b9737f079 led to the user being
able to drag an image in View mode and immediately drop it again.
The drag cursor implied Gwenview allowed this kind of operation, while
actually nothing would happen as the URL did not change.

To prevent confusion, we do not allow to drop the image in that
situation anymore. It is still possible to drop multiple images which
include the current image, so a future patch could implement switching
to Compare mode in that case.

As a side effect a small visual bug is fixed: When moving very slowly
while initiating a drag, the ForbiddenCursor would appear briefly
until you moved the mouse further along and the actual drag cursor
appeared. With the patch applied, the cursor will always keep being set
to ForbiddenCursor, preventing any flickering.

CCBUG: 386034

Test Plan

Slowly start to drag an image in View mode. The cursor should
indicate no dropping is allowed.

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rkflx requested review of this revision.Jun 25 2018, 9:45 PM
rkflx created this revision.
huoni accepted this revision.Jul 8 2018, 12:04 AM
huoni added a subscriber: huoni.

Sorry for the delay!

This patch is pretty straightforward and I see no issues with it.

This revision is now accepted and ready to land.Jul 8 2018, 12:04 AM
This revision was automatically updated to reflect the committed changes.