From ce9453ecf4e77e53b15a7ca0d5e944b71e75e26c Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Mon, 20 Jan 2020 09:08:18 +0800 Subject: [PATCH] Prevent negative zero shown in SpotLight gizmo --- editor/spatial_editor_gizmos.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index 89713c2579c..418ff1d2a34 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);