editors/Viewer.py
changeset 1248 2f08985625c0
parent 1247 92588e69d853
child 1249 b956c924cbbd
equal deleted inserted replaced
1247:92588e69d853 1248:2f08985625c0
  2227         dialog.SetMinElementSize((bbox.width, bbox.height))
  2227         dialog.SetMinElementSize((bbox.width, bbox.height))
  2228         if dialog.ShowModal() == wx.ID_OK:
  2228         if dialog.ShowModal() == wx.ID_OK:
  2229             id = self.GetNewId()
  2229             id = self.GetNewId()
  2230             values = dialog.GetValues()
  2230             values = dialog.GetValues()
  2231             variable = FBD_Variable(self, values["class"], values["expression"], values["var_type"], id)
  2231             variable = FBD_Variable(self, values["class"], values["expression"], values["var_type"], id)
       
  2232             variable.SetExecutionOrder(values["executionOrder"])
  2232             variable.SetPosition(bbox.x, bbox.y)
  2233             variable.SetPosition(bbox.x, bbox.y)
  2233             variable.SetSize(*self.GetScaledSize(values["width"], values["height"]))
  2234             variable.SetSize(*self.GetScaledSize(values["width"], values["height"]))
  2234             self.AddBlock(variable)
  2235             self.AddBlock(variable)
  2235             self.Controler.AddEditedElementVariable(self.TagName, id, values["class"])
  2236             self.Controler.AddEditedElementVariable(self.TagName, id, values["class"])
  2236             self.RefreshVariableModel(variable)
  2237             self.RefreshVariableModel(variable)