eric6/Preferences/ConfigurationPages/QtPage.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8043
0acf98cd089a
parent 8234
fcb6b4b96274
equal deleted inserted replaced
8190:fb0ef164f536 8273:698ae46f40a4
25 """ 25 """
26 def __init__(self): 26 def __init__(self):
27 """ 27 """
28 Constructor 28 Constructor
29 """ 29 """
30 super(QtPage, self).__init__() 30 super().__init__()
31 self.setupUi(self) 31 self.setupUi(self)
32 self.setObjectName("QtPage") 32 self.setObjectName("QtPage")
33 33
34 try: 34 try:
35 self.__virtualenvManager = e5App().getObject("VirtualEnvManager") 35 self.__virtualenvManager = e5App().getObject("VirtualEnvManager")
162 @param envKey preferences key for the environment 162 @param envKey preferences key for the environment
163 @type str 163 @type str
164 @param initial flag indicating an initial population 164 @param initial flag indicating an initial population
165 @type bool 165 @type bool
166 """ 166 """
167 if initial: 167 venvName = (Preferences.getQt(envKey) if initial
168 venvName = Preferences.getQt(envKey) 168 else comboBox.currentText())
169 else:
170 venvName = comboBox.currentText()
171 169
172 comboBox.clear() 170 comboBox.clear()
173 comboBox.addItems( 171 comboBox.addItems(
174 [""] + 172 [""] +
175 sorted(self.__virtualenvManager.getVirtualenvNames()) 173 sorted(self.__virtualenvManager.getVirtualenvNames())

eric ide

mercurial