eric6/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py

changeset 8259
2bbec88047dd
parent 8218
7c09585bd960
equal deleted inserted replaced
8258:82b608e352ec 8259:2bbec88047dd
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