forked from M-Labs/artiq
gui.entries: avoid intermediate value feedback, closes #533
This commit is contained in:
parent
3dc0101459
commit
f183f87840
|
@ -185,18 +185,24 @@ class _RangeScan(LayoutWidget):
|
||||||
def update_start(value):
|
def update_start(value):
|
||||||
state["start"] = value*scale
|
state["start"] = value*scale
|
||||||
scanner.setStart(value)
|
scanner.setStart(value)
|
||||||
|
if start.value() != value:
|
||||||
|
start.setValue(value)
|
||||||
|
|
||||||
def update_stop(value):
|
def update_stop(value):
|
||||||
state["stop"] = value*scale
|
state["stop"] = value*scale
|
||||||
scanner.setStop(value)
|
scanner.setStop(value)
|
||||||
|
if stop.value() != value:
|
||||||
|
stop.setValue(value)
|
||||||
|
|
||||||
def update_npoints(value):
|
def update_npoints(value):
|
||||||
state["npoints"] = value
|
state["npoints"] = value
|
||||||
scanner.setNum(value)
|
scanner.setNum(value)
|
||||||
|
if npoints.value() != value:
|
||||||
|
npoints.setValue(value)
|
||||||
|
|
||||||
scanner.startChanged.connect(start.setValue)
|
scanner.startChanged.connect(update_start)
|
||||||
scanner.numChanged.connect(npoints.setValue)
|
scanner.numChanged.connect(update_npoints)
|
||||||
scanner.stopChanged.connect(stop.setValue)
|
scanner.stopChanged.connect(update_stop)
|
||||||
start.valueChanged.connect(update_start)
|
start.valueChanged.connect(update_start)
|
||||||
npoints.valueChanged.connect(update_npoints)
|
npoints.valueChanged.connect(update_npoints)
|
||||||
stop.valueChanged.connect(update_stop)
|
stop.valueChanged.connect(update_stop)
|
||||||
|
|
Loading…
Reference in New Issue