diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-05 18:08:28 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-05 18:08:28 +0100 |
commit | f87858a8f26df0b9f5172703105de51fea3fedae (patch) | |
tree | 0a6c69a4e7c13bef31283c9b514cc404ad422a68 /scene | |
parent | 6ee3268189ee990708512888f09a77e5713b3a8d (diff) | |
parent | fe1f8443a411c64eb8a2934512ab982f3df3d550 (diff) |
Merge pull request #65101 from MrPhnix/range_value_bug
Bug: The range doesn't take into account the min value when setting the value.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/range.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index e0e4ead55f..00c81c8616 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -85,7 +85,7 @@ void Range::set_value(double p_val) { void Range::set_value_no_signal(double p_val) { if (shared->step > 0) { - p_val = Math::round(p_val / shared->step) * shared->step; + p_val = Math::round((p_val - shared->min) / shared->step) * shared->step + shared->min; } if (_rounded_values) { |