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()
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()
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)
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)