Browse Source

Merge pull request #21847 from Calinou/light-gizmo-update-inspector

Update Light properties in the inspector when dragging their gizmos
Rémi Verschelde 7 years ago
parent
commit
68f224a504
1 changed files with 7 additions and 0 deletions
  1. 7 0
      scene/3d/light.cpp

+ 7 - 0
scene/3d/light.cpp

@@ -48,6 +48,13 @@ void Light::set_param(Param p_param, float p_value) {
 
 	if (p_param == PARAM_SPOT_ANGLE || p_param == PARAM_RANGE) {
 		update_gizmo();
+
+		if (p_param == PARAM_SPOT_ANGLE) {
+			_change_notify("spot_angle");
+		} else if (p_param == PARAM_RANGE) {
+			_change_notify("omni_range");
+			_change_notify("spot_range");
+		}
 	}
 }