Esempio n. 1
0
 def unlink(self):
     canvas = self.canvas
     c1 = canvas.get_connection(self.head)
     c2 = canvas.get_connection(self.tail)
     if c1 and c2:
         adapter = IConnect(c1.connected, self)
         adapter.disconnect(self.head)
     super(CommentLineItem, self).unlink()
Esempio n. 2
0
    def unlink(self):
        assert self.canvas

        canvas = self.canvas
        c1 = canvas.get_connection(self.head)
        c2 = canvas.get_connection(self.tail)
        if c1 and c2:
            adapter = IConnect(c1.connected, self)
            adapter.disconnect(self.head)
        super().unlink()
Esempio n. 3
0
    def __call__(self):
        handle = self.handle
        item = self.item
        canvas = self.item.canvas
        cinfo = canvas.get_connection(handle)

        if self.disable:
            log.debug(f"Not disconnecting {item}.{handle} (disabled)")
        else:
            log.debug(f"Disconnecting {item}.{handle}")
            if cinfo:
                adapter = IConnect(cinfo.connected, item)
                adapter.disconnect(handle)
Esempio n. 4
0
    def __call__(self):
        handle = self.handle
        item = self.item
        canvas = self.item.canvas
        cinfo = canvas.get_connection(handle)

        if self.disable:
            log.debug("Not disconnecting %s.%s (disabled)" % (item, handle))
        else:
            log.debug("Disconnecting %s.%s" % (item, handle))
            if cinfo:
                adapter = IConnect(cinfo.connected, item)
                adapter.disconnect(handle)