editors/Viewer.py
changeset 1605 0b6b60241230
parent 1599 466c26b0cfc2
child 1607 f9c672ed8f9e
equal deleted inserted replaced
1604:7f98c091be56 1605:0b6b60241230
   885             wires.sort(lambda x, y: cmp(self.Wires[x], self.Wires[y]))
   885             wires.sort(lambda x, y: cmp(self.Wires[x], self.Wires[y]))
   886         if sort_comments:
   886         if sort_comments:
   887             comments.sort(lambda x, y: cmp(x.GetId(), y.GetId()))
   887             comments.sort(lambda x, y: cmp(x.GetId(), y.GetId()))
   888         return blocks + wires + comments
   888         return blocks + wires + comments
   889 
   889 
       
   890     def GetContinuationByName(self, name):
       
   891         blocks = []
       
   892         for block in self.Blocks.itervalues():
       
   893             if isinstance(block, FBD_Connector) and\
       
   894                block.GetType() == CONTINUATION and\
       
   895                block.GetName() == name:
       
   896                 blocks.append(block)
       
   897         return blocks
       
   898     
   890     def GetConnectorByName(self, name):
   899     def GetConnectorByName(self, name):
   891         for block in self.Blocks.itervalues():
   900         for block in self.Blocks.itervalues():
   892             if isinstance(block, FBD_Connector) and\
   901             if isinstance(block, FBD_Connector) and\
   893                block.GetType() == CONNECTOR and\
   902                block.GetType() == CONNECTOR and\
   894                block.GetName() == name:
   903                block.GetName() == name: