Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

stable repoview: fix multi-select behavior with manifest (fixes #1019 again)

The problem happens because the selection state is toggled twice:

user ctrl+clicks new row
repomodel moves current index to the clicked row
repomodel emits currentRowChanged
repoview emits revisionSelected
repowidget calls manifestwidget.setRev()
manifestwidget emits revChanged
repowidget calls repoview.goto()
the row becomes selected state by setCurrentIndex()
repomodel toggles the selection state of the row
(thus it becomes deselected)

Changeset 46296c315034

Parent f67a0d436955

by Yuya Nishihara

Changes to one file · Browse files at 46296c315034 Showing diff from parent f67a0d436955 Diff from another changeset...

 
279
280
281
282
 
 
 
283
284
285
 
279
280
281
 
282
283
284
285
286
287
@@ -279,7 +279,9 @@
  else:   idx = self.model().indexFromRev(rev)   if idx is not None: - self.setCurrentIndex(idx) + # avoid unwanted selection change (#1019) + if self.currentIndex().row() != idx.row(): + self.setCurrentIndex(idx)   self.scrollTo(idx)     def saveSettings(self, s = None):