mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When mirroring current index only mirror row, not column
This commit is contained in:
parent
d4d49fbe95
commit
4e5b306547
@ -340,7 +340,11 @@ class BooksView(QTableView): # {{{
|
||||
dest = self.pin_view if src is self else self
|
||||
self.allow_mirroring = False
|
||||
dest.selectionModel().select(src.selectionModel().selection(), QItemSelectionModel.ClearAndSelect)
|
||||
dest.selectionModel().setCurrentIndex(src.selectionModel().currentIndex(), QItemSelectionModel.NoUpdate)
|
||||
ci = dest.currentIndex()
|
||||
nci = src.selectionModel().currentIndex()
|
||||
if ci.isValid():
|
||||
nci = dest.model().index(nci.row(), ci.column())
|
||||
dest.selectionModel().setCurrentIndex(nci, QItemSelectionModel.NoUpdate)
|
||||
self.allow_mirroring = True
|
||||
|
||||
# Column Header Context Menu {{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user