This commit is contained in:
Kovid Goyal 2020-11-01 15:25:31 +05:30
parent 9789484a06
commit 129ca06b2b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -229,7 +229,7 @@ def dragEnterEvent(self, event):
def dropEvent(self, event): def dropEvent(self, event):
md = event.mimeData() md = event.mimeData()
if dnd_merge_ok(md): if dnd_merge_ok(md):
ids = set(map(int, bytes(md.data('application/calibre+from_library')).decode('utf-8').split(' '))) ids = set(map(int, filter(None, bytes(md.data('application/calibre+from_library')).decode('utf-8').split(' '))))
row = self.indexAt(event.pos()).row() row = self.indexAt(event.pos()).row()
if row > -1 and ids: if row > -1 and ids:
book_id = self.model().id(row) book_id = self.model().id(row)