From 7a1d7af332552e9658ef8e759614f3841984d4eb Mon Sep 17 00:00:00 2001 From: hodes Date: Tue, 29 Mar 2016 20:02:53 -0300 Subject: Enables the possibility of editing on multiple plugins at same time on same object type. --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 6 +++--- tools/editor/plugins/spatial_editor_plugin.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 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 6eb26542be..b5059e5299 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -1037,10 +1037,10 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { { EditorNode *en = editor; - EditorPlugin *over_plugin = en->get_editor_plugin_over(); + EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); - if (over_plugin) { - bool discard = over_plugin->forward_input_event(p_event); + if (!over_plugin_list->empty()) { + bool discard = over_plugin_list->forward_input_event(p_event); if (discard) { accept_event(); return; diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 79ff78ca0d..f6f9601b87 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -810,10 +810,10 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { { EditorNode *en = editor; - EditorPlugin *over_plugin = en->get_editor_plugin_over(); + EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); - if (over_plugin) { - bool discard = over_plugin->forward_spatial_input_event(camera,p_event); + if (!over_plugin_list->empty()) { + bool discard = over_plugin_list->forward_spatial_input_event(camera,p_event); if (discard) return; } @@ -3553,9 +3553,9 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) { { EditorNode *en = editor; - EditorPlugin *over_plugin = en->get_editor_plugin_over(); + EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); - if (over_plugin && over_plugin->forward_input_event(p_event)) { + if (!over_plugin_list->empty() && over_plugin_list->forward_input_event(p_event)) { return; //ate the over input event } -- cgit v1.2.3