##// END OF EJS Templates
Fix validate logic if min/max are changed
Gordon Ball -
Show More
@@ -78,6 +78,8 b' class _BoundedFloatRangeWidget(_FloatRangeWidget):'
78 78 """Validate min <= low <= high <= max"""
79 79 if name == "value":
80 80 low, high = new
81 else:
82 low, high = self.value
81 83 low = max(low, self.min)
82 84 high = min(high, self.max)
83 85 self.value = (min(low, high), max(low, high))
@@ -77,6 +77,8 b' class _BoundedIntRangeWidget(_IntRangeWidget):'
77 77 """Validate min <= low <= high <= max"""
78 78 if name == "value":
79 79 low, high = new
80 else:
81 low, high = self.value
80 82 low = max(low, self.min)
81 83 high = min(high, self.max)
82 84 self.value = (min(low, high), max(low, high))
General Comments 0
You need to be logged in to leave comments. Login now