From a8260b641c44099a8d06802f85618b6cf3537084 Mon Sep 17 00:00:00 2001 From: "Ingo B." Date: Thu, 10 Feb 2011 16:13:03 +0100 Subject: [PATCH] - Disables panning of the whole scene by mousewheel if the event is not catched earlier by an item implementing this. Test it at the empty space where the auto button appears in the plot window or on the scaleItems. Which element does this panning by default? parents: scene or view? --- PlotItem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PlotItem.py b/PlotItem.py index eb786f29..ed503e83 100644 --- a/PlotItem.py +++ b/PlotItem.py @@ -876,7 +876,9 @@ class PlotItem(QtGui.QGraphicsWidget): mode = False return mode - + def wheelEvent(self, ev): + # disables panning the whole scene by mousewheel + ev.accept() #def mousePressEvent(self, ev): #self.mousePos = array([ev.pos().x(), ev.pos().y()])