def loaded_file_on_mouse_release(self, event):
        """Act on mouse left button release.

        Act based on mouse position.

        event
            pygame.event.Event object of type pygame.MOUSEBUTTONUP
            or similar object.
        """
        ### store the mouse position when released
        mouse_pos = event.pos

        ### set the "clicked_mouse" flag off
        self.clicked_mouse = False

        ### check different groups of objects for collision

        gm = APP_REFS.gm

        for obj in chain(
            self.switches,
            gm.text_blocks.get_on_screen(),
            gm.nodes.get_on_screen(),
            gm.preview_toolbars.get_on_screen(),
            gm.preview_panels.get_on_screen(),
        ):

            if obj.rect.collidepoint(mouse_pos):

                obj.on_mouse_release(event)
                break

        ### getting to this "else clause" means none of the
        ### objects above collided;
        ###
        ### that is, the user either clicked the menubar,
        ### or the canvas in an empty area

        else:

            ### if the menu is hovered, we use it as the
            ### new loop holder in the application loop,
            ### by raising a special method, after we set
            ### the clicked_mouse flag to False, as an admin
            ### task

            if self.menubar.get_hovered_menu(mouse_pos):

                self.clicked_mouse = False

                raise SwitchLoopException(self.menubar)

            ## otherwise the user clicked the canvas, in
            ## which case we assume the user wants to
            ## deselect all objects (in case there are
            ## selected objects)
            else:
                APP_REFS.ea.deselect_all()
Act on mouse left button release.

        Act based on mouse position.

        event
            pygame.event.Event object of type pygame.MOUSEBUTTONUP
            or similar object.
        
nodezator/winman/states/loadedfile.py