summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorhodes <henrique.otavio.es@gmail.com>2016-03-29 20:02:53 -0300
committerhodes <henrique.otavio.es@gmail.com>2016-04-02 20:39:35 -0300
commit7a1d7af332552e9658ef8e759614f3841984d4eb (patch)
treec7e1e9237c7ba570b9788ff17eea05d008dd5d4f /tools/editor/plugins
parent15d1fca0614ad87fd16fa7532e4db867b342d00e (diff)
Enables the possibility of editing on multiple plugins at same time on same object type.
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp10
2 files changed, 8 insertions, 8 deletions
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
}