dialogs/FBDVariableDialog.py
changeset 1766 c1e5b9f19483
parent 1745 f9d32913bad4
child 1768 691083b5682a
equal deleted inserted replaced
1765:ccf59c1f0b45 1766:c1e5b9f19483
   150                 self.VariableName.Append(name)
   150                 self.VariableName.Append(name)
   151 
   151 
   152         # Get variable expression and select corresponding value in name list
   152         # Get variable expression and select corresponding value in name list
   153         # box if it exists
   153         # box if it exists
   154         selected = self.Expression.GetValue()
   154         selected = self.Expression.GetValue()
   155         if (selected != "" and
   155         if selected != "" and self.VariableName.FindString(selected) != wx.NOT_FOUND:
   156             self.VariableName.FindString(selected) != wx.NOT_FOUND):
       
   157             self.VariableName.SetStringSelection(selected)
   156             self.VariableName.SetStringSelection(selected)
   158         else:
   157         else:
   159             self.VariableName.SetSelection(wx.NOT_FOUND)
   158             self.VariableName.SetSelection(wx.NOT_FOUND)
   160 
   159 
   161         # Disable name list box if no name present inside
   160         # Disable name list box if no name present inside