Commit ea807933 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Correct ViewBox.translate to use setRange(x, y) when possible rather than making two calls.

parent 96a4ff7c
......@@ -608,11 +608,10 @@ class ViewBox(GraphicsWidget):
self.setRange(vr.translated(t), padding=0)
if x is not None:
x1, x2 = vr.left()+x, vr.right()+x
self.setXRange(x1, x2, padding=0)
x = vr.left()+x, vr.right()+x
if y is not None:
y1, y2 =, vr.bottom()+y
self.setYRange(y1, y2, padding=0)
y =, vr.bottom()+y
self.setRange(xRange=x, yRange=y, padding=0)
Supports Markdown
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