소스 검색

Ensure to disable freelook when leaving spatial editor

Fixes and prevents the problem with mouse getting stuck in MOUSE_MODE_CAPTURED when switching to canvas item editor plugin by any means other than manually (with mouse).
Andrii Doroshenko (Xrayez) 6 년 전
부모
커밋
a4e6e2f342
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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");
 	}