1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

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

@@ -702,13 +702,13 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
bottom_hb->set_h_size_flags(SIZE_EXPAND_FILL);
min_value = memnew(SpinBox);
min_value->set_max(0);
min_value->set_min(-10000);
min_value->set_max(0);
min_value->set_step(0.01);
max_value = memnew(SpinBox);
max_value->set_max(10000);
max_value->set_min(0.01);
max_value->set_max(10000);
max_value->set_step(0.01);
label_value = memnew(LineEdit);