Fixes following acq4 merge
This commit is contained in:
parent
753ac9b4c4
commit
1df5103d94
|
@ -29,7 +29,7 @@ def test_CSVExporter():
|
|||
r = csv.reader(open('test.csv', 'r'))
|
||||
lines = [line for line in r]
|
||||
header = lines.pop(0)
|
||||
assert header == ['myPlot_x', 'myPlot_y', 'x', 'y', 'x', 'y']
|
||||
assert header == ['myPlot_x', 'myPlot_y', 'x0001', 'y0001', 'x0002', 'y0002']
|
||||
|
||||
i = 0
|
||||
for vals in lines:
|
||||
|
|
|
@ -427,11 +427,11 @@ class ViewBox(GraphicsWidget):
|
|||
self.linkedYChanged()
|
||||
self.updateAutoRange()
|
||||
self.updateViewRange()
|
||||
self._matrixNeedsUpdate = True
|
||||
self.sigStateChanged.emit(self)
|
||||
self.background.setRect(self.rect())
|
||||
self.sigResized.emit(self)
|
||||
|
||||
|
||||
def viewRange(self):
|
||||
"""Return a the view's visible range as a list: [[xmin, xmax], [ymin, ymax]]"""
|
||||
return [x[:] for x in self.state['viewRange']] ## return copy
|
||||
|
@ -909,7 +909,7 @@ class ViewBox(GraphicsWidget):
|
|||
if k in args:
|
||||
if not np.all(np.isfinite(args[k])):
|
||||
r = args.pop(k)
|
||||
print "Warning: %s is invalid: %s" % (k, str(r))
|
||||
#print("Warning: %s is invalid: %s" % (k, str(r))
|
||||
|
||||
self.setRange(**args)
|
||||
finally:
|
||||
|
@ -1135,6 +1135,8 @@ class ViewBox(GraphicsWidget):
|
|||
Return the transform that maps from child(item in the childGroup) coordinates to local coordinates.
|
||||
(This maps from inside the viewbox to outside)
|
||||
"""
|
||||
if self._matrixNeedsUpdate:
|
||||
self.updateMatrix()
|
||||
m = self.childGroup.transform()
|
||||
#m1 = QtGui.QTransform()
|
||||
#m1.translate(self.childGroup.pos().x(), self.childGroup.pos().y())
|
||||
|
|
|
@ -20,11 +20,11 @@ def test_ViewBox():
|
|||
win.show()
|
||||
vb = win.addViewBox()
|
||||
|
||||
# set range before viewbox is shown
|
||||
vb.setRange(xRange=[0, 10], yRange=[0, 10], padding=0)
|
||||
|
||||
# required to make mapFromView work properly.
|
||||
qtest.qWaitForWindowShown(win)
|
||||
vb.update()
|
||||
|
||||
g = pg.GridItem()
|
||||
vb.addItem(g)
|
||||
|
|
|
@ -377,5 +377,5 @@ if __name__ == '__main__':
|
|||
camera.flash = 0
|
||||
|
||||
camera.solve()
|
||||
print camera.saveState()
|
||||
print(camera.saveState())
|
||||
|
Loading…
Reference in New Issue