Replaced QMatrix (deprecated) with QTransform
This commit is contained in:
parent
bcfd47d8c3
commit
349561e133
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user