1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Merge pull request #97543 from KoBeWi/to_edit_or_not_to_edit

Fix closing Theme Editor not actually closing it
This commit is contained in:
Rémi Verschelde
2024-10-04 22:43:41 +02:00
7 changed files with 30 additions and 68 deletions

View File

@@ -2390,7 +2390,7 @@ void EditorNode::hide_unused_editors(const Object *p_editing_owner) {
// This is to sweep properties that were removed from the inspector.
List<ObjectID> to_remove;
for (KeyValue<ObjectID, HashSet<EditorPlugin *>> &kv : active_plugins) {
const Object *context = ObjectDB::get_instance(kv.key);
Object *context = ObjectDB::get_instance(kv.key);
if (context) {
// In case of self-owning plugins, they are disabled here if they can auto hide.
const EditorPlugin *self_owning = Object::cast_to<EditorPlugin>(context);
@@ -2399,7 +2399,7 @@ void EditorNode::hide_unused_editors(const Object *p_editing_owner) {
}
}
if (!context) {
if (!context || context->call(SNAME("_should_stop_editing"))) {
to_remove.push_back(kv.key);
for (EditorPlugin *plugin : kv.value) {
if (plugin->can_auto_hide()) {