Fix Clipboard rows cannot be sorted via drag/drop

Fixes #10849
This commit is contained in:
prculley 2018-10-20 16:02:04 -05:00 committed by Nick Hall
parent c110d9bc23
commit 582d61e67e

View File

@ -1293,9 +1293,9 @@ class ClipboardListView:
data = [_ob.__class__.DRAG_TARGET.drag_type, _ob, None, data = [_ob.__class__.DRAG_TARGET.drag_type, _ob, None,
_ob._type, _ob._value, _ob._dbid, _ob._dbname] _ob._type, _ob._value, _ob._dbid, _ob._dbname]
contains = model_contains(model, data) contains = model_contains(model, data)
if (contains and if (contains and not
((context.action if hasattr(context, "action") else ((context.action if hasattr(context, "action") else
context.get_actions()) != Gdk.DragAction.MOVE)): context.get_actions()) & Gdk.DragAction.MOVE)):
continue continue
drop_info = widget.get_dest_row_at_pos(x, y) drop_info = widget.get_dest_row_at_pos(x, y)
if drop_info: if drop_info:
@ -1314,7 +1314,7 @@ class ClipboardListView:
# on self, then it moves the first, and copies the rest. # on self, then it moves the first, and copies the rest.
if ((context.action if hasattr(context, "action") else if ((context.action if hasattr(context, "action") else
context.get_actions()) == Gdk.DragAction.MOVE): context.get_actions()) & Gdk.DragAction.MOVE):
context.finish(True, True, time) context.finish(True, True, time)
# remember time for double drop workaround. # remember time for double drop workaround.