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

Merge pull request #107947 from lodetrick/inspector-pending

Replace Inspector `pending` stack usage with loop
This commit is contained in:
Thaddeus Crews
2025-10-30 10:45:54 -05:00

View File

@@ -2132,8 +2132,7 @@ void EditorInspectorSection::_notification(int p_what) {
String num_revertable_str; String num_revertable_str;
int num_revertable_width = 0; 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()) { 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; 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;
@@ -5686,11 +5685,8 @@ void EditorInspector::_notification(int p_what) {
if (update_tree_pending) { if (update_tree_pending) {
update_tree(); update_tree();
update_tree_pending = false; update_tree_pending = false;
pending.clear();
} else { } else {
while (pending.size()) { for (const StringName &prop : pending) {
StringName prop = *pending.begin();
if (editor_property_map.has(prop)) { if (editor_property_map.has(prop)) {
for (EditorProperty *E : editor_property_map[prop]) { for (EditorProperty *E : editor_property_map[prop]) {
E->update_property(); E->update_property();
@@ -5698,7 +5694,6 @@ void EditorInspector::_notification(int p_what) {
E->update_cache(); E->update_cache();
} }
} }
pending.remove(pending.begin());
} }
for (EditorInspectorSection *S : sections) { for (EditorInspectorSection *S : sections) {
@@ -5706,6 +5701,8 @@ void EditorInspector::_notification(int p_what) {
} }
} }
pending.clear();
changing--; changing--;
} break; } break;