From f183f87840cf4e024f335d1f45d35deb0f3b80bd Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 4 Aug 2016 11:32:59 +0200 Subject: [PATCH] gui.entries: avoid intermediate value feedback, closes #533 --- artiq/gui/entries.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/artiq/gui/entries.py b/artiq/gui/entries.py index 9571e34af..0e1190b97 100644 --- a/artiq/gui/entries.py +++ b/artiq/gui/entries.py @@ -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)