summaryrefslogtreecommitdiff
path: root/editor/spatial_editor_gizmos.cpp
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2020-01-20 09:08:18 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2020-01-20 09:08:18 +0800
commitce9453ecf4e77e53b15a7ca0d5e944b71e75e26c (patch)
tree28cc200a56f040f3c165acd3b1696ff07c8a661c /editor/spatial_editor_gizmos.cpp
parentadb6734b491091663d9159efe6e5a5fa9ff5202f (diff)
Prevent negative zero shown in SpotLight gizmo
Diffstat (limited to 'editor/spatial_editor_gizmos.cpp')
-rw-r--r--editor/spatial_editor_gizmos.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 89713c2579..418ff1d2a3 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -885,7 +885,7 @@ void LightSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_idx,
d = Math::stepify(d, SpatialEditor::get_singleton()->get_translate_snap());
}
- if (d < 0)
+ if (d <= 0) // Equal is here for negative zero.
d = 0;
light->set_param(Light::PARAM_RANGE, d);