mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 21:52:51 +00:00
editor_node.cpp now takes care of removing plugin after deactivating it
This commit is contained in:
parent
4b05181397
commit
7544cd6ce2
@ -2944,6 +2944,9 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) {
|
|||||||
//singleton->main_editor_tabs->add_tab(p_editor->get_name());
|
//singleton->main_editor_tabs->add_tab(p_editor->get_name());
|
||||||
singleton->editor_table.erase(p_editor);
|
singleton->editor_table.erase(p_editor);
|
||||||
}
|
}
|
||||||
|
p_editor->make_visible(false);
|
||||||
|
p_editor->clear();
|
||||||
|
singleton->editor_plugins_over->get_plugins_list().erase(p_editor);
|
||||||
singleton->remove_child(p_editor);
|
singleton->remove_child(p_editor);
|
||||||
singleton->editor_data.remove_editor_plugin( p_editor );
|
singleton->editor_data.remove_editor_plugin( p_editor );
|
||||||
|
|
||||||
@ -2996,7 +2999,7 @@ void EditorNode::set_addon_plugin_enabled(const String& p_addon,bool p_enabled)
|
|||||||
if (!p_enabled) {
|
if (!p_enabled) {
|
||||||
|
|
||||||
EditorPlugin *addon = plugin_addons[p_addon];
|
EditorPlugin *addon = plugin_addons[p_addon];
|
||||||
editor_data.remove_editor_plugin( addon );
|
remove_editor_plugin(addon);
|
||||||
memdelete(addon); //bye
|
memdelete(addon); //bye
|
||||||
plugin_addons.erase(p_addon);
|
plugin_addons.erase(p_addon);
|
||||||
_update_addon_config();
|
_update_addon_config();
|
||||||
|
Loading…
Reference in New Issue
Block a user