forked from M-Labs/artiq
1
0
Fork 0

gui.entries: avoid intermediate value feedback, closes #533

This commit is contained in:
Robert Jördens 2016-08-04 11:32:59 +02:00
parent 3dc0101459
commit f183f87840
1 changed files with 9 additions and 3 deletions

View File

@ -185,18 +185,24 @@ class _RangeScan(LayoutWidget):
def update_start(value):
state["start"] = value*scale
scanner.setStart(value)
if start.value() != value:
start.setValue(value)
def update_stop(value):
state["stop"] = value*scale
scanner.setStop(value)
if stop.value() != value:
stop.setValue(value)
def update_npoints(value):
state["npoints"] = value
scanner.setNum(value)
if npoints.value() != value:
npoints.setValue(value)
scanner.startChanged.connect(start.setValue)
scanner.numChanged.connect(npoints.setValue)
scanner.stopChanged.connect(stop.setValue)
scanner.startChanged.connect(update_start)
scanner.numChanged.connect(update_npoints)
scanner.stopChanged.connect(update_stop)
start.valueChanged.connect(update_start)
npoints.valueChanged.connect(update_npoints)
stop.valueChanged.connect(update_stop)