summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-09-27 16:32:27 +0200
committerkobewi <kobewi4e@gmail.com>2024-09-27 17:08:20 +0200
commit66d2b0fc6a7f656f37e65a93eacc77642602aca9 (patch)
treef5f9dad9bebc0aad57a6c756f132f9723bce2c60 /editor/editor_node.cpp
parent76a135926aef1f02f27e4e09093787f2c670956d (diff)
downloadredot-engine-66d2b0fc6a7f656f37e65a93eacc77642602aca9.tar.gz
Fix closing Theme Editor not actually closing it
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 665255b9b2..41148f8332 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2386,7 +2386,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);
@@ -2395,7 +2395,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()) {