Skip to content

Commit

Permalink
gui.entries: avoid intermediate value feedback, closes #533
Browse files Browse the repository at this point in the history
jordens committed Aug 4, 2016
1 parent 0728be7 commit 14addf7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions artiq/gui/entries.py
Original file line number Diff line number Diff line change
@@ -184,18 +184,24 @@ def apply_properties(widget):
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)

0 comments on commit 14addf7

Please sign in to comment.