diff --git a/pupil_src/shared_modules/video_overlay/utils/constraints.py b/pupil_src/shared_modules/video_overlay/utils/constraints.py index d0a0b0f41c..ecad3fce04 100644 --- a/pupil_src/shared_modules/video_overlay/utils/constraints.py +++ b/pupil_src/shared_modules/video_overlay/utils/constraints.py @@ -39,11 +39,11 @@ def __init__(self, value, constraint=NoConstraint()): @property def value(self): - return self._val + return self.constraint.apply_to(self._val) @value.setter def value(self, new_val): - self._val = self.constraint.apply_to(new_val) + self._val = new_val @property def constraint(self): @@ -52,7 +52,6 @@ def constraint(self): @constraint.setter def constraint(self, new_constraint): self._constraint = new_constraint - self.value = self.value # apply new constraint @constraint.deleter def constraint(self):