--- a/eric6/E5Gui/E5ToolButton.py Mon Apr 12 19:05:23 2021 +0200 +++ b/eric6/E5Gui/E5ToolButton.py Mon Apr 12 19:21:40 2021 +0200 @@ -201,15 +201,12 @@ self.__pressTimer.start() if ( - evt.buttons() == Qt.MouseButton.LeftButton and - self.__menu is not None and - self.popupMode() == QToolButton.ToolButtonPopupMode.InstantPopup - ): - self.setDown(True) - self.__showMenu() - elif ( - evt.buttons() == Qt.MouseButton.RightButton and - self.__menu is not None + (evt.buttons() == Qt.MouseButton.LeftButton and + self.__menu is not None and + (self.popupMode() == + QToolButton.ToolButtonPopupMode.InstantPopup)) or + (evt.buttons() == Qt.MouseButton.RightButton and + self.__menu is not None) ): self.setDown(True) self.__showMenu()