def mousePressEvent(self, event: QMouseEvent):
        logger.debug("MousePressEvent")
        if event.buttons() == Qt.LeftButton:
            self.__mouse_press_pos = event.globalPos()
            self.__command_handler.start_script()

            if event.modifiers() == Qt.AltModifier:
                self.__rubber_band.setGeometry(
                    QRect(self.__mouse_press_pos, QSize()))
                self.__rubber_band.show()
                self.__clear_selection()
    def __handle_widget_release(self,
                                widget: GraphItem,
                                mouse_event: QMouseEvent):
        if not mouse_event.modifiers() == Qt.ShiftModifier:
            self.__clear_selection()

        # Clear visible handles
        self.__clear_handles()

        if widget in self.__selection:
            self.__remove_selection(widget)
        else:
            self.__add_selection(widget)