Răsfoiți Sursa

Merge pull request #65101 from MrPhnix/range_value_bug

Bug: The range doesn't take into account the min value when setting the value.
Rémi Verschelde 2 ani în urmă
părinte
comite
f87858a8f2
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      scene/gui/range.cpp

+ 1 - 1
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) {