You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix error with favorited properties with open sub-inspectors
This commit is contained in:
@@ -3782,6 +3782,8 @@ 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);
|
||||||
|
|
||||||
|
// If this property is favorited, it won't be in the tree yet. So don't do this setup right now.
|
||||||
|
if (ep->is_inside_tree()) {
|
||||||
ep->update_property();
|
ep->update_property();
|
||||||
ep->_update_flags();
|
ep->_update_flags();
|
||||||
ep->update_editor_property_status();
|
ep->update_editor_property_status();
|
||||||
@@ -3793,6 +3795,7 @@ void EditorInspector::update_tree() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!current_favorites.is_empty()) {
|
if (!current_favorites.is_empty()) {
|
||||||
favorites_section->show();
|
favorites_section->show();
|
||||||
@@ -3841,6 +3844,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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user