fix: ImageView calling deprecated QGraphicsItem.scale()
This commit is contained in:
parent
e752336b55
commit
11b4a1bb47
@ -358,12 +358,14 @@ class ImageView(QtGui.QWidget):
|
|||||||
|
|
||||||
profiler()
|
profiler()
|
||||||
|
|
||||||
self.imageItem.resetTransform()
|
if transform is None:
|
||||||
if scale is not None:
|
transform = QtGui.QTransform()
|
||||||
self.imageItem.scale(*scale)
|
# note that the order of transform is
|
||||||
|
# scale followed by translate
|
||||||
if pos is not None:
|
if pos is not None:
|
||||||
self.imageItem.setPos(*pos)
|
transform.translate(*pos)
|
||||||
if transform is not None:
|
if scale is not None:
|
||||||
|
transform.scale(*scale)
|
||||||
self.imageItem.setTransform(transform)
|
self.imageItem.setTransform(transform)
|
||||||
|
|
||||||
profiler()
|
profiler()
|
||||||
|
Loading…
Reference in New Issue
Block a user