Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

manifestdialog: preserve currently selected path when changing rev

Changeset 02164ac5f5db

Parent 5c281e25e449

by Yuya Nishihara

Changes to one file · Browse files at 02164ac5f5db Showing diff from parent 5c281e25e449 Diff from another changeset...

 
174
175
176
 
177
178
179
 
 
 
 
 
 
 
 
 
 
 
180
181
182
 
174
175
176
177
178
179
 
180
181
182
183
184
185
186
187
188
189
190
191
192
193
@@ -174,9 +174,20 @@
  @pyqtSlot(object)   def setrev(self, rev):   """Change revision to show""" + origpath = self.path   self._rev = rev   self._setupmodel() - self._treeview.setCurrentIndex(self._treemodel.index(0, 0)) # TODO + self.setpath(origpath) + + @property + def path(self): + """Return currently selected path""" + return self._treemodel.pathFromIndex(self._treeview.currentIndex()) + + @pyqtSlot(unicode) + def setpath(self, path): + """Change path to show""" + self._treeview.setCurrentIndex(self._treemodel.indexFromPath(path))     @pyqtSlot(QModelIndex)   def _fileselected(self, index):