pyqt6: Fix drop actions check

This commit is contained in:
Kovid Goyal 2022-01-01 08:36:58 +05:30
parent 494e9f17a6
commit 81381aa8ec
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -219,8 +219,7 @@ def dnd_merge_ok(md):
def dragEnterEvent(self, event): def dragEnterEvent(self, event):
if int(event.possibleActions() & Qt.DropAction.CopyAction) + \ if not event.possibleActions() & (Qt.DropAction.CopyAction | Qt.DropAction.MoveAction):
int(event.possibleActions() & Qt.DropAction.MoveAction) == 0:
return return
paths = self.paths_from_event(event) paths = self.paths_from_event(event)
md = event.mimeData() md = event.mimeData()