Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def updateEDAselection(self):
''' @brief Update the EDA selection in the listBox based on the comboBox actual text.'''
fileNames = re.split(SEP_FILES, self.m_comboBox_files.GetValue())
if len(fileNames)==1:
eda_module = file_eda_match(fileNames[0])
if eda_module:
self.m_listBox_edatool.SetSelection(self.m_listBox_edatool.FindString(eda_dict[eda_module]['label']))
elif len(fileNames)>1:
# Check if all the EDA are the same. For different ones,
# the guide is not able now to deal, need improvement
# on `self.m_listBox_edatool`.
eda_module = file_eda_match(fileNames[0])
for fName in fileNames[1:]:
if file_eda_match(fName) != eda_module:
return
if eda_module:
self.m_listBox_edatool.SetSelection(self.m_listBox_edatool.FindString(eda_dict[eda_module]['label']))
def updateEDAselection(self):
''' @brief Update the EDA selection in the listBox based on the comboBox actual text.'''
fileNames = re.split(SEP_FILES, self.m_comboBox_files.GetValue())
if len(fileNames)==1:
eda_module = file_eda_match(fileNames[0])
if eda_module:
self.m_listBox_edatool.SetSelection(self.m_listBox_edatool.FindString(eda_dict[eda_module]['label']))
elif len(fileNames)>1:
# Check if all the EDA are the same. For different ones,
# the guide is not able now to deal, need improvement
# on `self.m_listBox_edatool`.
eda_module = file_eda_match(fileNames[0])
for fName in fileNames[1:]:
if file_eda_match(fName) != eda_module:
return
if eda_module:
self.m_listBox_edatool.SetSelection(self.m_listBox_edatool.FindString(eda_dict[eda_module]['label']))