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

reporegistry: try to fix updating of reporegistry tree view

If a repo was opened by using menu "File -> Open repository" the tree view
widget was not updated and the black triangle in front of the
"All Repositories" node even disappeared. Which is quite disappointing.

Fixed for now by calling reset() for the view (TODO: find a less drastic workaround)
and posting an expand request via single shot timer (direct call doesn't work).

If someone with more Qt fu knows how to fix this better, please fix it.

Changeset 4c99fae7ed47

Parent 4843d743a2e1

by Adrian Buehlmann

Changes to one file · Browse files at 4c99fae7ed47 Showing diff from parent 4843d743a2e1 Diff from another changeset...

 
166
167
168
169
 
170
171
 
172
173
174
175
176
177
 
 
 
166
167
168
 
169
170
 
171
172
173
174
175
176
177
178
179
@@ -166,12 +166,14 @@
  tv.setIndentation(10)   tv.setFirstColumnSpanned(0, QModelIndex(), True)   - QtCore.QTimer.singleShot(0, self.initialized) + QtCore.QTimer.singleShot(0, self.expand)   - def initialized(self): + def expand(self):   self.tview.expandToDepth(0)     def addRepo(self, reporoot):   m = self.tmodel   if m.getRepoItem(reporoot) == None:   m.addRepo(reporoot) + self.tview.reset() + QtCore.QTimer.singleShot(0, self.expand)