Skip to content

Commit f191fc8

Browse files
committed
Remove stack pattern in inspector pending
1 parent 4a1c1c4 commit f191fc8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

editor/inspector/editor_inspector.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,8 +2061,7 @@ void EditorInspectorSection::_notification(int p_what) {
20612061
String num_revertable_str;
20622062
int num_revertable_width = 0;
20632063

2064-
bool folded = (foldable || !checkbox_only) && !object->editor_is_section_unfolded(section);
2065-
2064+
bool folded = (foldable || !checkbox_only) && !vbox->is_visible();
20662065
if (folded && revertable_properties.size()) {
20672066
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;
20682067

@@ -5554,26 +5553,24 @@ void EditorInspector::_notification(int p_what) {
55545553
if (update_tree_pending) {
55555554
update_tree();
55565555
update_tree_pending = false;
5557-
pending.clear();
5558-
55595556
} else {
5560-
while (pending.size()) {
5561-
StringName prop = *pending.begin();
5557+
for (const StringName &prop : pending) {
55625558
if (editor_property_map.has(prop)) {
55635559
for (EditorProperty *E : editor_property_map[prop]) {
55645560
E->update_property();
55655561
E->update_editor_property_status();
55665562
E->update_cache();
55675563
}
55685564
}
5569-
pending.remove(pending.begin());
55705565
}
55715566

55725567
for (EditorInspectorSection *S : sections) {
55735568
S->update_property();
55745569
}
55755570
}
55765571

5572+
pending.clear();
5573+
55775574
changing--;
55785575
} break;
55795576

0 commit comments

Comments
 (0)