Changeset f47d747b8c4d…
Parent 122baf1b6ec2…
by
Changes to 3 files · Browse files at f47d747b8c4d Showing diff from parent 122baf1b6ec2 Diff from another changeset...
@@ -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,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,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)
|
Loading...