def cancel_defining_segment(self):
        """Cancel definition of a new line segment."""
        ### delete attribute holding socket reference
        ### from where to define a line
        del self.socket_a

        ### change window manager state to the loaded
        ### file state
        APP_REFS.wm.set_state("loaded_file")

        ### restart the loop
        raise ContinueLoopException
Cancel definition of a new line segment.
nodezator/graphman/socketparenthood/action.py