summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-04-06 18:41:51 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-04-06 18:41:51 +0200
commitaad31ee986e60183c708f0c6d31cc04e05f31916 (patch)
tree5f0fcd73afef335bab17da7916c14c2344f6986f /tools/editor/plugins
parent2f12c2dd9090e4b8f959e3bebf4f7ce57b0186b2 (diff)
parent7a1d7af332552e9658ef8e759614f3841984d4eb (diff)
Merge pull request #4174 from Hodes/master
Multiple editor plugins for same obj 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 c78b3086ea..9ab7aafeb2 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -834,10 +834,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;
}
@@ -3576,9 +3576,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
}