mirror of https://github.com/m-labs/artiq.git
image: refactor data_changed
This commit is contained in:
parent
25959d0cd6
commit
b6a83904b5
|
@ -11,9 +11,9 @@ class Image(pyqtgraph.ImageView):
|
||||||
pyqtgraph.ImageView.__init__(self)
|
pyqtgraph.ImageView.__init__(self)
|
||||||
self.args = args
|
self.args = args
|
||||||
|
|
||||||
def data_changed(self, data, mods):
|
def data_changed(self, value, metadata, persist, mods):
|
||||||
try:
|
try:
|
||||||
img = data[self.args.img][1]
|
img = value[self.args.img]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return
|
return
|
||||||
self.setImage(img)
|
self.setImage(img)
|
||||||
|
|
Loading…
Reference in New Issue