mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-11-16 12:19:03 +00:00
qt: scroll to selection on results refresh.
This commit is contained in:
parent
6b0bfda9fb
commit
d62c3663e9
@ -60,6 +60,7 @@ class ResultsModel(TreeModel):
|
|||||||
self.view.selectionModel().select(selection, flags)
|
self.view.selectionModel().select(selection, flags)
|
||||||
flags = QItemSelectionModel.Rows
|
flags = QItemSelectionModel.Rows
|
||||||
self.view.selectionModel().setCurrentIndex(selectedIndexes[0], flags)
|
self.view.selectionModel().setCurrentIndex(selectedIndexes[0], flags)
|
||||||
|
self.view.scrollTo(selectedIndexes[0])
|
||||||
else:
|
else:
|
||||||
self.view.selectionModel().clear()
|
self.view.selectionModel().clear()
|
||||||
|
|
||||||
@ -144,8 +145,8 @@ class ResultsModel(TreeModel):
|
|||||||
#--- model --> view
|
#--- model --> view
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
self.reset()
|
self.reset()
|
||||||
self._updateSelection()
|
|
||||||
self.view.expandAll()
|
self.view.expandAll()
|
||||||
|
self._updateSelection()
|
||||||
|
|
||||||
def invalidate_markings(self):
|
def invalidate_markings(self):
|
||||||
# redraw view
|
# redraw view
|
||||||
|
Loading…
Reference in New Issue
Block a user