mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix drag and drop of multiple items in the File Browser causing item order to be reversed.
This commit is contained in:
parent
287fa218aa
commit
89eb3a59a4
@ -658,9 +658,7 @@ class FileList(QTreeWidget):
|
|||||||
def selectedIndexes(self):
|
def selectedIndexes(self):
|
||||||
ans = QTreeWidget.selectedIndexes(self)
|
ans = QTreeWidget.selectedIndexes(self)
|
||||||
if self.ordered_selected_indexes:
|
if self.ordered_selected_indexes:
|
||||||
# The reverse is needed because Qt's implementation of dropEvent
|
ans = list(sorted(ans, key=lambda idx:idx.row()))
|
||||||
# reverses the selectedIndexes when dropping.
|
|
||||||
ans = list(sorted(ans, key=lambda idx:idx.row(), reverse=True))
|
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
def dropEvent(self, event):
|
def dropEvent(self, event):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user