summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-01-30 15:46:44 +0200
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-03-05 12:42:25 +0200
commita4e6e2f342737bb2c4d22816a83e76a0c27f5ee9 (patch)
tree72003d8dd21fd5e264eac6ef5a8a0f612a51b935
parente761af57949a81a680551159344180b561d3d528 (diff)
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).
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp6
1 files changed, 4 insertions, 2 deletions
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");
}