diff options
author | Marc Gilleron <marc.gilleron@gmail.com> | 2017-06-20 02:24:35 +0200 |
---|---|---|
committer | Marc Gilleron <marc.gilleron@gmail.com> | 2017-06-20 02:50:25 +0200 |
commit | 0fd66a4f8fd12562f4bbad391f87ccc97e3784af (patch) | |
tree | 677a9735e8db3adcd3950c5fc77e9e5ea63b4058 /editor/plugins/spatial_editor_plugin.cpp | |
parent | f919be936b366f23388a8bcd99941d1fcd7cba73 (diff) |
Fixed freelook conflict with text inputs
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 2d27e218ec..c55bef1b03 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: { |