Browse Source

Merge pull request #26630 from Xrayez/spatial-mouse-uncapture

Ensure to disable freelook when leaving spatial editor
Rémi Verschelde 6 years ago
parent
commit
bb8de092a1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      editor/plugins/spatial_editor_plugin.cpp

+ 4 - 2
editor/plugins/spatial_editor_plugin.cpp

@@ -2108,9 +2108,11 @@ void SpatialEditorViewport::_notification(int p_what) {
 
 		set_process(visible);
 
-		if (visible)
+		if (visible) {
 			_update_camera(0);
-
+		} else {
+			set_freelook_active(false);
+		}
 		call_deferred("update_transform_gizmo_view");
 	}