2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-23 00:56:42 +08:00

scanwidget: value may be None

This commit is contained in:
Sebastien Bourdeauducq 2016-06-11 16:48:58 -06:00
parent d3f092ce98
commit 1faac1018b

View File

@ -71,6 +71,8 @@ class ScanWidget(QtWidgets.QWidget):
self._setView(left, scale) self._setView(left, scale)
def _clamp(self, v): def _clamp(self, v):
if v is None:
return None
if self._min is not None: if self._min is not None:
v = max(self._min, v) v = max(self._min, v)
if self._max is not None: if self._max is not None: