Merge pull request #824 from ronpandolfi/develop

Fix for PySide2; QtCore.QPoint.__sub__ no longer works with tuples
This commit is contained in:
Luke Campagnola 2019-05-03 10:58:21 -07:00 committed by GitHub
commit 51b3201564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,7 +362,7 @@ class GraphicsView(QtGui.QGraphicsView):
def mouseMoveEvent(self, ev): def mouseMoveEvent(self, ev):
if self.lastMousePos is None: if self.lastMousePos is None:
self.lastMousePos = Point(ev.pos()) self.lastMousePos = Point(ev.pos())
delta = Point(ev.pos() - self.lastMousePos) delta = Point(ev.pos() - QtCore.QPoint(*self.lastMousePos))
self.lastMousePos = Point(ev.pos()) self.lastMousePos = Point(ev.pos())
QtGui.QGraphicsView.mouseMoveEvent(self, ev) QtGui.QGraphicsView.mouseMoveEvent(self, ev)