Range: Fix cases where max was set to or below min value

It will now raise an error whenever this happens so that we can fix
these situations. `max == min` is not allowed as it could lead to
divisions by zero in ratios, and `max < min` doesn't make much sense.

Fixes #33907.
This commit is contained in:
Rémi Verschelde 2019-11-26 10:25:41 +01:00
parent 55f86e9b7b
commit bfd5e09879
5 changed files with 7 additions and 9 deletions

View file

@ -388,7 +388,6 @@ void ScrollContainer::update_scrollbars() {
if (hide_scroll_v) {
v_scroll->hide();
v_scroll->set_max(0);
scroll.y = 0;
} else {
@ -406,7 +405,6 @@ void ScrollContainer::update_scrollbars() {
if (hide_scroll_h) {
h_scroll->hide();
h_scroll->set_max(0);
scroll.x = 0;
} else {