diff --git a/pyqtgraph/opengl/GLViewWidget.py b/pyqtgraph/opengl/GLViewWidget.py index 8896bdc0..e9061c6c 100644 --- a/pyqtgraph/opengl/GLViewWidget.py +++ b/pyqtgraph/opengl/GLViewWidget.py @@ -430,10 +430,11 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): return xDist / self.width() def mousePressEvent(self, ev): - self.mousePos = ev.localPos() + lpos = ev.position() if hasattr(ev, 'position') else ev.localPos() + self.mousePos = lpos def mouseMoveEvent(self, ev): - lpos = ev.localPos() + lpos = ev.position() if hasattr(ev, 'position') else ev.localPos() diff = lpos - self.mousePos self.mousePos = lpos