pyqt6: Fix drop actions check

This commit is contained in:
Kovid Goyal 2022-01-01 08:36:58 +05:30
parent b76c76390e
commit 50e5fb1e4f
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):
if int(event.possibleActions() & Qt.DropAction.CopyAction) + \
int(event.possibleActions() & Qt.DropAction.MoveAction) == 0:
if not event.possibleActions() & (Qt.DropAction.CopyAction | Qt.DropAction.MoveAction):
return
paths = self.paths_from_event(event)
md = event.mimeData()