From b123bc4a2a9c07fcfd27a84109960bda158b3b9d Mon Sep 17 00:00:00 2001 From: Richard Nespithal Date: Fri, 8 Jan 2016 13:07:15 +0100 Subject: do not return zero with minus-sign within range value, fixes #3221 --- scene/gui/range.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 25b7952da1..d3b7521c9a 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -77,7 +77,11 @@ void Range::set_val(double p_val) { if (p_valmin) p_val=shared->min; - + + //avoid to set -0 + if (p_val == 0) + p_val = 0; + if (shared->val==p_val) return; -- cgit v1.2.3