eric6/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8259
2bbec88047dd
equal deleted inserted replaced
8190:fb0ef164f536 8273:698ae46f40a4
23 23
24 @param vcs reference to the git object 24 @param vcs reference to the git object
25 @param repodir directory name of the local repository (string) 25 @param repodir directory name of the local repository (string)
26 @param parent reference to the parent widget (QWidget) 26 @param parent reference to the parent widget (QWidget)
27 """ 27 """
28 super(GitFetchDialog, self).__init__(parent) 28 super().__init__(parent)
29 self.setupUi(self) 29 self.setupUi(self)
30 30
31 self.__vcs = vcs 31 self.__vcs = vcs
32 self.__repodir = repodir 32 self.__repodir = repodir
33 33
121 """ 121 """
122 Private slot to handle a change of selected remote branches. 122 Private slot to handle a change of selected remote branches.
123 """ 123 """
124 singleSelection = len(self.remoteBranchesList.selectedItems()) == 1 124 singleSelection = len(self.remoteBranchesList.selectedItems()) == 1
125 self.localBranchComboBox.setEnabled(singleSelection) 125 self.localBranchComboBox.setEnabled(singleSelection)
126 if singleSelection: 126 txt = (
127 txt = self.remoteBranchesList.selectedItems()[0].text() 127 self.remoteBranchesList.selectedItems()[0].text()
128 else: 128 if singleSelection else
129 txt = "" 129 ""
130 )
130 index = self.localBranchComboBox.findText(txt) 131 index = self.localBranchComboBox.findText(txt)
131 if index == -1: 132 if index == -1:
132 self.localBranchComboBox.setEditText(txt) 133 self.localBranchComboBox.setEditText(txt)
133 else: 134 else:
134 self.localBranchComboBox.setCurrentIndex(index) 135 self.localBranchComboBox.setCurrentIndex(index)

eric ide

mercurial