SFCViewer.py
changeset 122 e6faee0c271b
parent 121 40b91ba978db
child 144 b67a5de5a24a
equal deleted inserted replaced
121:40b91ba978db 122:e6faee0c271b
  1026             step.RefreshOutputModel(True)
  1026             step.RefreshOutputModel(True)
  1027             
  1027             
  1028     def DeleteWire(self, wire):
  1028     def DeleteWire(self, wire):
  1029         if self.GetDrawingMode() == FREEDRAWING_MODE:
  1029         if self.GetDrawingMode() == FREEDRAWING_MODE:
  1030             Viewer.DeleteWire(self, wire)
  1030             Viewer.DeleteWire(self, wire)
  1031     
  1031 
       
  1032 #-------------------------------------------------------------------------------
       
  1033 #                          Model update functions
       
  1034 #-------------------------------------------------------------------------------
       
  1035 
       
  1036     def RefreshBlockModel(self, block):
       
  1037         blockid = block.GetId()
       
  1038         infos = {}
       
  1039         infos["type"] = block.GetType()
       
  1040         infos["name"] = block.GetName()
       
  1041         infos["x"], infos["y"] = block.GetPosition()
       
  1042         infos["width"], infos["height"] = block.GetSize()
       
  1043         infos["connectors"] = block.GetConnectors()
       
  1044         self.Controler.SetEditedElementBlockInfos(self.TagName, blockid, infos)
       
  1045