From f191fc8ab71da0ed3134189a4e867cd9e558aadf Mon Sep 17 00:00:00 2001 From: Logan Detrick Date: Thu, 3 Jul 2025 22:15:50 -0700 Subject: [PATCH] Remove stack pattern in inspector pending --- editor/inspector/editor_inspector.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/editor/inspector/editor_inspector.cpp b/editor/inspector/editor_inspector.cpp index 0f41815e418..9f239fa16e1 100644 --- a/editor/inspector/editor_inspector.cpp +++ b/editor/inspector/editor_inspector.cpp @@ -2061,8 +2061,7 @@ void EditorInspectorSection::_notification(int p_what) { String num_revertable_str; int num_revertable_width = 0; - bool folded = (foldable || !checkbox_only) && !object->editor_is_section_unfolded(section); - + bool folded = (foldable || !checkbox_only) && !vbox->is_visible(); if (folded && revertable_properties.size()) { int label_width = theme_cache.bold_font->get_string_size(label, HORIZONTAL_ALIGNMENT_LEFT, available, theme_cache.bold_font_size, TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_CONSTRAIN_ELLIPSIS).x; @@ -5554,11 +5553,8 @@ void EditorInspector::_notification(int p_what) { if (update_tree_pending) { update_tree(); update_tree_pending = false; - pending.clear(); - } else { - while (pending.size()) { - StringName prop = *pending.begin(); + for (const StringName &prop : pending) { if (editor_property_map.has(prop)) { for (EditorProperty *E : editor_property_map[prop]) { E->update_property(); @@ -5566,7 +5562,6 @@ void EditorInspector::_notification(int p_what) { E->update_cache(); } } - pending.remove(pending.begin()); } for (EditorInspectorSection *S : sections) { @@ -5574,6 +5569,8 @@ void EditorInspector::_notification(int p_what) { } } + pending.clear(); + changing--; } break;