forked from M-Labs/artiq
progress_bar: refactor data_changed
This commit is contained in:
parent
6c588b83d7
commit
068a2d1663
@ -12,12 +12,12 @@ class ProgressWidget(QtWidgets.QProgressBar):
|
||||
self.setMaximum(args.max)
|
||||
self.dataset_value = args.value
|
||||
|
||||
def data_changed(self, data, mods):
|
||||
def data_changed(self, value, metadata, persist, mods):
|
||||
try:
|
||||
value = round(data[self.dataset_value][1])
|
||||
val = round(value[self.dataset_value])
|
||||
except (KeyError, ValueError, TypeError):
|
||||
value = 0
|
||||
self.setValue(value)
|
||||
val = 0
|
||||
self.setValue(val)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user