From a4e6e2f342737bb2c4d22816a83e76a0c27f5ee9 Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Wed, 30 Jan 2019 15:46:44 +0200 Subject: 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). --- editor/plugins/spatial_editor_plugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor/plugins/spatial_editor_plugin.cpp') diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 1e9ff87fd3..ed11d26f25 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/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"); } -- cgit v1.2.3