File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed
Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -3832,13 +3832,16 @@ void EditorInspector::update_tree() {
38323832 ep->set_doc_path (doc_path);
38333833 ep->set_internal (p.usage & PROPERTY_USAGE_INTERNAL);
38343834
3835- ep->update_property ();
3836- ep->_update_flags ();
3837- ep->update_editor_property_status ();
3838- ep->update_cache ();
3839-
3840- if (current_selected && ep->property == current_selected) {
3841- ep->select (current_focusable);
3835+ // If this property is favorited, it won't be in the tree yet. So don't do this setup right now.
3836+ if (ep->is_inside_tree ()) {
3837+ ep->update_property ();
3838+ ep->_update_flags ();
3839+ ep->update_editor_property_status ();
3840+ ep->update_cache ();
3841+
3842+ if (current_selected && ep->property == current_selected) {
3843+ ep->select (current_focusable);
3844+ }
38423845 }
38433846 }
38443847 }
@@ -3891,6 +3894,16 @@ void EditorInspector::update_tree() {
38913894
38923895 for (EditorProperty *ep : KV2.value ) {
38933896 vbox->add_child (ep);
3897+
3898+ // Now that it's inside the tree, do the setup.
3899+ ep->update_property ();
3900+ ep->_update_flags ();
3901+ ep->update_editor_property_status ();
3902+ ep->update_cache ();
3903+
3904+ if (current_selected && ep->property == current_selected) {
3905+ ep->select (current_focusable);
3906+ }
38943907 }
38953908 }
38963909 }
You can’t perform that action at this time.
0 commit comments