Viewer.py
changeset 330 d803ba077da0
parent 327 7fd5233ce5ce
child 331 9106d66bd204
equal deleted inserted replaced
329:1cf72cb51dc9 330:d803ba077da0
  1729         dialog.Destroy()
  1729         dialog.Destroy()
  1730 
  1730 
  1731     def AddNewConnection(self, bbox):
  1731     def AddNewConnection(self, bbox):
  1732         dialog = ConnectionPropertiesDialog(self.ParentWindow, self.Controler)
  1732         dialog = ConnectionPropertiesDialog(self.ParentWindow, self.Controler)
  1733         dialog.SetPreviewFont(self.GetFont())
  1733         dialog.SetPreviewFont(self.GetFont())
       
  1734         dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug))
       
  1735         dialog.SetPouElementNames(self.Controler.GetEditedElementVariables(self.TagName, self.Debug))
  1734         dialog.SetMinConnectionSize((bbox.width, bbox.height))
  1736         dialog.SetMinConnectionSize((bbox.width, bbox.height))
  1735         if dialog.ShowModal() == wx.ID_OK:
  1737         if dialog.ShowModal() == wx.ID_OK:
  1736             id = self.GetNewId()
  1738             id = self.GetNewId()
  1737             values = dialog.GetValues()
  1739             values = dialog.GetValues()
  1738             connection = FBD_Connector(self, values["type"], values["name"], id)
  1740             connection = FBD_Connector(self, values["type"], values["name"], id)
  2049         dialog.Destroy()
  2051         dialog.Destroy()
  2050 
  2052 
  2051     def EditConnectionContent(self, connection):
  2053     def EditConnectionContent(self, connection):
  2052         dialog = ConnectionPropertiesDialog(self.ParentWindow, self.Controler)
  2054         dialog = ConnectionPropertiesDialog(self.ParentWindow, self.Controler)
  2053         dialog.SetPreviewFont(self.GetFont())
  2055         dialog.SetPreviewFont(self.GetFont())
       
  2056         dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug))
       
  2057         dialog.SetPouElementNames(self.Controler.GetEditedElementVariables(self.TagName, self.Debug))
  2054         dialog.SetMinConnectionSize(connection.GetSize())
  2058         dialog.SetMinConnectionSize(connection.GetSize())
  2055         values = {"name" : connection.GetName(), "type" : connection.GetType()}
  2059         values = {"name" : connection.GetName(), "type" : connection.GetType()}
  2056         dialog.SetValues(values)
  2060         dialog.SetValues(values)
  2057         if dialog.ShowModal() == wx.ID_OK:
  2061         if dialog.ShowModal() == wx.ID_OK:
  2058             old_type = connection.GetType()
  2062             old_type = connection.GetType()