forked from M-Labs/artiq
gui/entries/_RangeScan: set range before setting value. Fixes clamping to 99.99
This commit is contained in:
parent
1faac1018b
commit
ddd1c12852
|
@ -22,7 +22,8 @@ class SubComponent2(HasEnvironment):
|
|||
def build(self):
|
||||
self.setattr_argument("sc2_boolean", BooleanValue(False),
|
||||
"Transporter")
|
||||
self.setattr_argument("sc2_scan", Scannable(default=NoScan(325)),
|
||||
self.setattr_argument("sc2_scan", Scannable(
|
||||
default=LinearScan(200, 300, 49)),
|
||||
"Transporter")
|
||||
self.setattr_argument("sc2_enum", EnumerationValue(["3", "4", "5"]),
|
||||
"Transporter")
|
||||
|
|
|
@ -177,6 +177,10 @@ class _RangeScan(LayoutWidget):
|
|||
disable_scroll_wheel(stop)
|
||||
self.addWidget(stop, 2, 1)
|
||||
|
||||
apply_properties(start)
|
||||
apply_properties(stop)
|
||||
apply_properties(scanner)
|
||||
|
||||
def update_start(value):
|
||||
state["start"] = value*scale
|
||||
scanner.setStart(value)
|
||||
|
@ -198,9 +202,6 @@ class _RangeScan(LayoutWidget):
|
|||
scanner.setStart(state["start"]/scale)
|
||||
scanner.setNum(state["npoints"])
|
||||
scanner.setStop(state["stop"]/scale)
|
||||
apply_properties(start)
|
||||
apply_properties(stop)
|
||||
apply_properties(scanner)
|
||||
|
||||
|
||||
class _ExplicitScan(LayoutWidget):
|
||||
|
|
Loading…
Reference in New Issue