##// 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 """Validate min <= low <= high <= max"""
78 """Validate min <= low <= high <= max"""
79 if name == "value":
79 if name == "value":
80 low, high = new
80 low, high = new
81 else:
82 low, high = self.value
81 low = max(low, self.min)
83 low = max(low, self.min)
82 high = min(high, self.max)
84 high = min(high, self.max)
83 self.value = (min(low, high), max(low, high))
85 self.value = (min(low, high), max(low, high))
@@ -77,6 +77,8 b' class _BoundedIntRangeWidget(_IntRangeWidget):'
77 """Validate min <= low <= high <= max"""
77 """Validate min <= low <= high <= max"""
78 if name == "value":
78 if name == "value":
79 low, high = new
79 low, high = new
80 else:
81 low, high = self.value
80 low = max(low, self.min)
82 low = max(low, self.min)
81 high = min(high, self.max)
83 high = min(high, self.max)
82 self.value = (min(low, high), max(low, high))
84 self.value = (min(low, high), max(low, high))
General Comments 0
You need to be logged in to leave comments. Login now