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 |
|
|
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 | """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 |
|
|
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