diff --git a/orangecanvas/document/schemeedit.py b/orangecanvas/document/schemeedit.py index 739821980..ec15f8c51 100644 --- a/orangecanvas/document/schemeedit.py +++ b/orangecanvas/document/schemeedit.py @@ -1552,7 +1552,14 @@ def eventFilter(self, obj, event): elif etype == QEvent.GraphicsSceneDrop: return self.sceneDropEvent(event) elif etype == QEvent.GraphicsSceneMousePress: - self.__pasteOrigin = event.scenePos() + if event.button() == Qt.BackButton: + self.__historyStep(-1) + elif event.button() == Qt.ForwardButton: + self.__historyStep(1) + elif event.button() in ( + Qt.LeftButton, Qt.RightButton, Qt.MiddleButton + ): + self.__pasteOrigin = event.scenePos() return self.sceneMousePressEvent(event) elif etype == QEvent.GraphicsSceneMouseMove: return self.sceneMouseMoveEvent(event) @@ -1733,8 +1740,8 @@ def sceneMouseDoubleClickEvent(self, event): return False item = scene.item_at(event.scenePos()) - if not item and self.__quickMenuTriggers & \ - SchemeEditWidget.DoubleClicked: + if not item and event.button() == Qt.LeftButton and \ + self.__quickMenuTriggers & SchemeEditWidget.DoubleClicked: # Double click on an empty spot # Create a new node using QuickMenu action = interactions.NewNodeAction(self)