diff options
| author | Juan Linietsky | 2016-01-16 22:41:10 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-01-16 22:41:10 -0300 |
| commit | 72fcb8a35beab251d01864bc67da3e3a8e75aed6 (patch) | |
| tree | 9ad5837e4237d1071a9e1a5b40efdaffa3f89f33 /tools/editor/plugins | |
| parent | 40818299231fe1854635ffe36d8b9565f430b35f (diff) | |
| download | godot-72fcb8a35beab251d01864bc67da3e3a8e75aed6.tar.gz godot-72fcb8a35beab251d01864bc67da3e3a8e75aed6.tar.zst godot-72fcb8a35beab251d01864bc67da3e3a8e75aed6.zip | |
-Moved all the "root" input handling for GUI from individual Controls to Viewport.
-Should fix several reported bugs when controls don't have a common parent
This may have added new bugs, so please report if so!
Diffstat (limited to 'tools/editor/plugins')
| -rw-r--r-- | tools/editor/plugins/canvas_item_editor_plugin.cpp | 2 | ||||
| -rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 2eaf017d0..139d84911 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() || window_has_modal_stack()) + if (!is_visible() || get_viewport()->gui_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 e47dcbf30..ab5a20fa2 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -3529,7 +3529,7 @@ void SpatialEditor::_instance_scene() { void SpatialEditor::_unhandled_key_input(InputEvent p_event) { - if (!is_visible() || window_has_modal_stack()) + if (!is_visible() || get_viewport()->gui_has_modal_stack()) return; { |
