editors/Viewer.py
changeset 1247 92588e69d853
parent 1246 101625efb1c1
child 1248 2f08985625c0
equal deleted inserted replaced
1246:101625efb1c1 1247:92588e69d853
  2226         dialog.SetPreviewFont(self.GetFont())
  2226         dialog.SetPreviewFont(self.GetFont())
  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["vr_type"], id)
  2231             variable = FBD_Variable(self, values["class"], values["expression"], values["var_type"], id)
  2232             variable.SetPosition(bbox.x, bbox.y)
  2232             variable.SetPosition(bbox.x, bbox.y)
  2233             variable.SetSize(*self.GetScaledSize(values["width"], values["height"]))
  2233             variable.SetSize(*self.GetScaledSize(values["width"], values["height"]))
  2234             self.AddBlock(variable)
  2234             self.AddBlock(variable)
  2235             self.Controler.AddEditedElementVariable(self.TagName, id, values["class"])
  2235             self.Controler.AddEditedElementVariable(self.TagName, id, values["class"])
  2236             self.RefreshVariableModel(variable)
  2236             self.RefreshVariableModel(variable)