aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-10-17 10:29:54 -0300
committerJuan Linietsky2015-10-17 10:29:54 -0300
commitab22203791489df160c36a29a3cd8aa8b32bec04 (patch)
treeb534f9c0f3cc4e71708deebb0107a61f1216f930 /tools/editor/plugins/spatial_editor_plugin.cpp
parentb3cda43a0fb49e1cb9c8414077a23fa4b61ede38 (diff)
downloadgodot-ab22203791489df160c36a29a3cd8aa8b32bec04.tar.gz
godot-ab22203791489df160c36a29a3cd8aa8b32bec04.tar.zst
godot-ab22203791489df160c36a29a3cd8aa8b32bec04.zip
misc cleanup
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 8fc6a6931..3ab933926 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -677,7 +677,8 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2& p_screenpos,bool p_hili
void SpatialEditorViewport::_smouseenter() {
- surface->grab_focus();
+ if (!surface->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
+ surface->grab_focus();
}
void SpatialEditorViewport::_sinput(const InputEvent &p_event) {