aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-06-24 23:06:04 +0200
committerGitHub2017-06-24 23:06:04 +0200
commit68891baa1b091ed0e7a40df2f097e757dc4884a8 (patch)
treee115325098029fd57714e41dff3ef1107f771737 /editor/plugins/spatial_editor_plugin.cpp
parent44c7210387765056d3628e669447ee02abc13e96 (diff)
parent0fd66a4f8fd12562f4bbad391f87ccc97e3784af (diff)
downloadgodot-68891baa1b091ed0e7a40df2f097e757dc4884a8.tar.gz
godot-68891baa1b091ed0e7a40df2f097e757dc4884a8.tar.zst
godot-68891baa1b091ed0e7a40df2f097e757dc4884a8.zip
Merge pull request #9281 from Zylann/fix_freelook_keyboard
Fixed freelook conflict with text inputs
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 2d27e218e..c55bef1b0 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -775,6 +775,11 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
freelook_active = b->is_pressed();
+ if (freelook_active && !surface->has_focus()) {
+ // Focus usually doesn't trigger on right-click, but in case of freelook it should,
+ // otherwise using keyboard navigation would misbehave
+ surface->grab_focus();
+ }
} break;
case BUTTON_MIDDLE: {