Dont show the merge books popup when dropping a book onto itself.

Fixes #1777054 [Merge books keeps popping up](https://bugs.launchpad.net/calibre/+bug/1777054)
This commit is contained in:
Kovid Goyal 2018-06-15 11:16:12 +05:30
parent fe63b2fde8
commit 3a6fd2bf0d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -219,7 +219,7 @@ def dropEvent(self, event):
row = self.indexAt(event.pos()).row()
if row > -1 and ids:
book_id = self.model().id(row)
if book_id:
if book_id and book_id not in ids:
self.books_dropped.emit({book_id: ids})
event.setDropAction(Qt.CopyAction)
event.accept()