Commit 349561e1 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Replaced QMatrix (deprecated) with QTransform

parent bcfd47d8
......@@ -141,7 +141,7 @@ class GraphicsView(QtGui.QGraphicsView):
return
scale = Point(self.size().width()/self.range.width(), self.size().height()/self.range.height())
m = QtGui.QMatrix()
m = QtGui.QTransform()
## First center the viewport at 0
self.resetMatrix()
......@@ -163,7 +163,7 @@ class GraphicsView(QtGui.QGraphicsView):
st = translate
m.translate(-st[0], -st[1])
#print " translate:", st
self.setMatrix(m)
self.setTransform(m)
self.currentScale = scale
#self.emit(QtCore.SIGNAL('viewChanged'), self.range)
self.sigRangeChanged.emit(self, self.range)
......
......@@ -1719,7 +1719,7 @@ class ViewBox(QtGui.QGraphicsWidget):
return
scale = Point(bounds.width()/vr.width(), bounds.height()/vr.height())
#print " scale:", scale
m = QtGui.QMatrix()
m = QtGui.QTransform()
## First center the viewport at 0
self.childGroup.resetMatrix()
......@@ -1742,7 +1742,7 @@ class ViewBox(QtGui.QGraphicsWidget):
st = translate
m.translate(-st[0], -st[1])
#print " translate:", st
self.childGroup.setMatrix(m)
self.childGroup.setTransform(m)
self.currentScale = scale
def invertY(self, b=True):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment