Переглянути джерело

Merge pull request #75331 from KoBeWi/remove_removed_plugins

Remove disabled plugins from active plugins
Yuri Sizov 2 роки тому
батько
коміт
b57f3c2e67
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      editor/editor_node.cpp

+ 4 - 0
editor/editor_node.cpp

@@ -3534,6 +3534,10 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
 	singleton->editor_plugins_force_input_forwarding->remove_plugin(p_editor);
 	singleton->remove_child(p_editor);
 	singleton->editor_data.remove_editor_plugin(p_editor);
+
+	for (KeyValue<ObjectID, HashSet<EditorPlugin *>> &kv : singleton->active_plugins) {
+		kv.value.erase(p_editor);
+	}
 }
 
 void EditorNode::_update_addon_config() {