diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 38b4f1f79..557c5d1a9 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -78,7 +78,7 @@ void Range::Shared::emit_changed(const char *p_what) { void Range::set_value(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) {