forked from M-Labs/artiq
scanwidget: value may be None
This commit is contained in:
parent
d3f092ce98
commit
1faac1018b
|
@ -71,6 +71,8 @@ class ScanWidget(QtWidgets.QWidget):
|
|||
self._setView(left, scale)
|
||||
|
||||
def _clamp(self, v):
|
||||
if v is None:
|
||||
return None
|
||||
if self._min is not None:
|
||||
v = max(self._min, v)
|
||||
if self._max is not None:
|
||||
|
|
Loading…
Reference in New Issue