|
@@ -2318,16 +2318,20 @@ void EditorNode::edit_item(Object *p_object, Object *p_editing_owner) {
|
|
|
active_plugins[owner_id].erase(plugin);
|
|
|
}
|
|
|
|
|
|
+ LocalVector<EditorPlugin *> to_over_edit;
|
|
|
+
|
|
|
// Send the edited object to the plugins.
|
|
|
for (EditorPlugin *plugin : available_plugins) {
|
|
|
if (active_plugins[owner_id].has(plugin)) {
|
|
|
- // Plugin was already active, just change the object.
|
|
|
+ // Plugin was already active, just change the object and ensure it's visible.
|
|
|
+ plugin->make_visible(true);
|
|
|
plugin->edit(p_object);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
if (active_plugins.has(plugin->get_instance_id())) {
|
|
|
// Plugin is already active, but as self-owning, so it needs a separate check.
|
|
|
+ plugin->make_visible(true);
|
|
|
plugin->edit(p_object);
|
|
|
continue;
|
|
|
}
|
|
@@ -2346,6 +2350,11 @@ void EditorNode::edit_item(Object *p_object, Object *p_editing_owner) {
|
|
|
|
|
|
// Activate previously inactive plugin and edit the object.
|
|
|
active_plugins[owner_id].insert(plugin);
|
|
|
+ // TODO: Call the function directly once a proper priority system is implemented.
|
|
|
+ to_over_edit.push_back(plugin);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (EditorPlugin *plugin : to_over_edit) {
|
|
|
_plugin_over_edit(plugin, p_object);
|
|
|
}
|
|
|
}
|