Explorar o código

Prevent negative zero shown in SpotLight gizmo

Haoyu Qiu %!s(int64=5) %!d(string=hai) anos
pai
achega
ce9453ecf4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      editor/spatial_editor_gizmos.cpp

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