Esempio n. 1
0
 def update_avoid(self, *args, **kw):
     src = avoid.ConnEnd(avoid.Point(self.source[0], self.source[1]))
     dest = avoid.ConnEnd(avoid.Point(self.dest[0], self.dest[1]))
     if self.avoid_conn is None:
         self.avoid_conn = avoid.ConnRef(router, src, dest)
     else:
         self.avoid_conn.setEndpoints(src, dest)
     router.processTransaction()
Esempio n. 2
0
 def _update_avoid(self):
     if self.parentItem():
         avoid_router = self.parentItem().avoid_router
         src = avoid.ConnEnd(avoid.Point(self.x1, self.y1))
         if self.isVisible():
             dest = avoid.ConnEnd(avoid.Point(self.x2, self.y2))
         else:
             dest = src  # Don't route duplicate connection
         if self.avoid_conn is None:
             self.avoid_conn = avoid.ConnRef(avoid_router, src, dest)
         else:
             self.avoid_conn.setEndpoints(src, dest)
Esempio n. 3
0
 def __init__(self, *args, **kw):
     self.avoid_conn = avoid.ConnRef(router)
     super().__init__(*args, **kw)
     router.connections.append(self)