1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Merge pull request #102874 from YeldhamDev/fix_fav_no_parent

Fix error with favorited properties with open sub-inspectors
This commit is contained in:
Rémi Verschelde
2025-02-15 23:09:56 +01:00

View File

@@ -3832,13 +3832,16 @@ void EditorInspector::update_tree() {
ep->set_doc_path(doc_path); ep->set_doc_path(doc_path);
ep->set_internal(p.usage & PROPERTY_USAGE_INTERNAL); ep->set_internal(p.usage & PROPERTY_USAGE_INTERNAL);
ep->update_property(); // If this property is favorited, it won't be in the tree yet. So don't do this setup right now.
ep->_update_flags(); if (ep->is_inside_tree()) {
ep->update_editor_property_status(); ep->update_property();
ep->update_cache(); ep->_update_flags();
ep->update_editor_property_status();
ep->update_cache();
if (current_selected && ep->property == current_selected) { if (current_selected && ep->property == current_selected) {
ep->select(current_focusable); ep->select(current_focusable);
}
} }
} }
} }
@@ -3891,6 +3894,16 @@ void EditorInspector::update_tree() {
for (EditorProperty *ep : KV2.value) { for (EditorProperty *ep : KV2.value) {
vbox->add_child(ep); vbox->add_child(ep);
// Now that it's inside the tree, do the setup.
ep->update_property();
ep->_update_flags();
ep->update_editor_property_status();
ep->update_cache();
if (current_selected && ep->property == current_selected) {
ep->select(current_focusable);
}
} }
} }
} }