From e187762c2d9c73650a84f633aab83d447e725d3e Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 15 Jan 2016 11:37:45 +0100 Subject: Spatial/Canvas Editor: Ignore unhandled input if there is a dialog --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 2 +- tools/editor/plugins/spatial_editor_plugin.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/editor/plugins') diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 56ed95fb16..2eaf017d08 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -194,7 +194,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) { void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) { - if (!is_visible()) + if (!is_visible() || window_has_modal_stack()) return; if (p_ev.key.mod.control) // prevent to change tool mode when control key is pressed diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 29d2a7774c..e47dcbf30f 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -3529,10 +3529,10 @@ void SpatialEditor::_instance_scene() { void SpatialEditor::_unhandled_key_input(InputEvent p_event) { - if (!is_visible()) + if (!is_visible() || window_has_modal_stack()) return; - { + { EditorNode *en = editor; EditorPlugin *over_plugin = en->get_editor_plugin_over(); -- cgit v1.2.3