diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 5f6459045a6..964936a14d3 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -261,7 +261,7 @@ void ScriptEditorDebugger::_scene_tree_folded(Object *obj) { return; ObjectID id = item->get_metadata(0); - if (item->is_collapsed()) { + if (unfold_cache.has(id)) { unfold_cache.erase(id); } else { unfold_cache.insert(id);