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

workbench: fix restoring of branch combo on repo tab change

branch combo current index was not restored

Changeset f47d747b8c4d

Parent 122baf1b6ec2

by Adrian Buehlmann

Changes to 3 files · Browse files at f47d747b8c4d Showing diff from parent 122baf1b6ec2 Diff from another changeset...

 
145
146
147
 
148
149
150
 
170
171
172
 
 
 
173
174
175
 
145
146
147
148
149
150
151
 
171
172
173
174
175
176
177
178
179
@@ -145,6 +145,7 @@
  def setRepo(self, repo, branch='', fromhead=None, follow=False):   oldrepo = self.repo   self.repo = repo + self._branch = branch   if oldrepo.root != repo.root:   self.load_config()   self._datacache = {} @@ -170,6 +171,9 @@
  QtCore.QTimer.singleShot(0, Curry(self.emit, SIGNAL('filled')))   self._fill_timer = self.startTimer(50)   + def branch(self): + return self._branch +   def ensureBuilt(self, rev=None, row=None):   """   Make sure rev data is available (graph element created).
 
342
343
344
 
 
 
345
346
347
 
342
343
344
345
346
347
348
349
350
@@ -342,6 +342,9 @@
  self.repomodel.setRepo(   self.repo, branch=branch, fromhead=startrev, follow=follow)   + def filterbranch(self): + return self.repomodel.branch() +   def okToContinue(self):   '''   returns False if there is unsaved data
 
159
160
161
162
 
 
163
164
165
166
 
 
 
 
 
 
 
 
167
168
169
 
159
160
161
 
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
@@ -159,11 +159,20 @@
  self.branch_comboBox_action.setEnabled(False)   self.branch_comboBox.clear()   else: - self.branchesmodel = QtGui.QStringListModel([''] + branches) + branches = [''] + branches + self.branchesmodel = QtGui.QStringListModel(branches)   self.branch_comboBox.setModel(self.branchesmodel)   self.branch_label_action.setEnabled(True)   self.branch_comboBox_action.setEnabled(True)   + branch = w.filterbranch() + index = -1 + for i, b in enumerate(branches): + if b == branch: + index = i + break + self.branch_comboBox.setCurrentIndex(index) +   def createToolbars(self):   # find quickbar   self.find_toolbar = tb = FindInGraphlogQuickBar(self)