'Cleanup all temporary items in the scene that are left.'

def cleanup(self):

    if self.tmp_link_item:
        self.tmp_link_item.setSinkItem(None)
        self.tmp_link_item.setSourceItem(None)
        if self.tmp_link_item.scene():
            self.scene.removeItem(self.tmp_link_item)
        self.tmp_link_item = None
    if self.current_target_item:
        self.remove_tmp_anchor()
        self.current_target_item = None
    if (self.cursor_anchor_point and self.cursor_anchor_point.scene()):
        self.scene.removeItem(self.cursor_anchor_point)
        self.cursor_anchor_point = None
