mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-03 19:44:32 +01:00
When mirroring current index only mirror row, not column
This commit is contained in:
parent
d4d49fbe95
commit
4e5b306547
1 changed files with 5 additions and 1 deletions
|
|
@ -340,7 +340,11 @@ def mirror_selection_between_views(self, src):
|
|||
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…
Reference in a new issue