Changeset 2289

Show
Ignore:
Timestamp:
04/07/08 01:25:39 (1 month ago)
Author:
arj..@yirdis.nl
Message:

cleanup.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/gaphor/adapters/connectors.py

    r2287 r2289  
    944944    """ 
    945945    def glue(self, handle): 
    946         # If one side of self.element has more than one edge, the 
    947         # type of node is determined (either join or fork). 
    948         # 
    949         # TODO: remove these restrictions and create a combined join/fork or 
    950         #       decision/merge node  
    951         #if handle is line.head and len(subject.incoming) > 1 and len(subject.outgoing) > 0: 
    952         #    return None 
    953         # 
    954         #if handle is line.tail and len(subject.incoming) > 0 and len(subject.outgoing) > 1: 
    955         #    return None 
    956  
    957 #        assert len(self.element.handles()) == 2, '%s: %d' % (self.element, len(self.element.handles())) 
    958 #        h1, h2 = self.element.handles() 
    959 #        return geometry.distance_line_point(h1.pos, h2.pos, (x, y))[1] 
    960          
    961946        # No cyclic connect is possible on a Flow/Decision node: 
    962         line = self.line 
     947        head, tail = self.line.head, self.line.tail 
    963948        subject = self.element.subject 
    964949         
    965         if handle is line.head and line.tail.connected_to and line.tail.connected_to.subject is subject \ 
    966            or handle is line.tail and line.head.connected_to and line.head.connected_to.subject is subject: 
     950        if handle is head and tail.connected_to and tail.connected_to.subject is subject \ 
     951           or handle is tail and head.connected_to and head.connected_to.subject is subject: 
    967952            return None 
    968953