diff options
| author | Richard Nespithal | 2016-01-08 13:07:15 +0100 |
|---|---|---|
| committer | Richard Nespithal | 2016-01-08 15:57:03 +0100 |
| commit | b123bc4a2a9c07fcfd27a84109960bda158b3b9d (patch) | |
| tree | 40aa1a2824891ff185d91f4a41c1752ab6db8db7 /scene/gui/range.cpp | |
| parent | 79c1392d17156aeb8d6a2abca16db59b1f8312cc (diff) | |
| download | godot-b123bc4a2a9c07fcfd27a84109960bda158b3b9d.tar.gz godot-b123bc4a2a9c07fcfd27a84109960bda158b3b9d.tar.zst godot-b123bc4a2a9c07fcfd27a84109960bda158b3b9d.zip | |
Diffstat (limited to 'scene/gui/range.cpp')
| -rw-r--r-- | scene/gui/range.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 25b7952da..d3b7521c9 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -77,7 +77,11 @@ void Range::set_val(double p_val) { if (p_val<shared->min) p_val=shared->min; - + + //avoid to set -0 + if (p_val == 0) + p_val = 0; + if (shared->val==p_val) return; |
