Skip to content

Commit 638366b

Browse files
committed
Merge pull request #107947 from lodetrick/inspector-pending
Replace Inspector `pending` stack usage with loop
2 parents a176e4f + f191fc8 commit 638366b

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
@@ -2132,8 +2132,7 @@ void EditorInspectorSection::_notification(int p_what) {
21322132
String num_revertable_str;
21332133
int num_revertable_width = 0;
21342134

2135-
bool folded = (foldable || !checkbox_only) && !object->editor_is_section_unfolded(section);
2136-
2135+
bool folded = (foldable || !checkbox_only) && !vbox->is_visible();
21372136
if (folded && revertable_properties.size()) {
21382137
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;
21392138

@@ -5686,26 +5685,24 @@ void EditorInspector::_notification(int p_what) {
56865685
if (update_tree_pending) {
56875686
update_tree();
56885687
update_tree_pending = false;
5689-
pending.clear();
5690-
56915688
} else {
5692-
while (pending.size()) {
5693-
StringName prop = *pending.begin();
5689+
for (const StringName &prop : pending) {
56945690
if (editor_property_map.has(prop)) {
56955691
for (EditorProperty *E : editor_property_map[prop]) {
56965692
E->update_property();
56975693
E->update_editor_property_status();
56985694
E->update_cache();
56995695
}
57005696
}
5701-
pending.remove(pending.begin());
57025697
}
57035698

57045699
for (EditorInspectorSection *S : sections) {
57055700
S->update_property();
57065701
}
57075702
}
57085703

5704+
pending.clear();
5705+
57095706
changing--;
57105707
} break;
57115708

0 commit comments

Comments
 (0)