Enable objects stored as dictionary keys to be selected in inspector.

Currently, when using the stack trace or the remote scene tree and selecting an
object containing a dictionary, secondary objects that are stored as values in
the dictionary can be opened in inspector by clicking on them. However,
attempting to open the same secondary object if it is stored as a key in the
dictionary will result in nothing happening.

This is fixed by connecting keys to the "object_id_selected" signal the same
way values are connected.
This commit is contained in:
StarryWorm 2025-09-06 10:01:57 -04:00
parent 3c7f9b9372
commit 45f089a143

View file

@ -1345,6 +1345,7 @@ void EditorPropertyDictionary::update_property() {
}
new_prop->set_read_only(true);
new_prop->set_selectable(false);
new_prop->connect(SNAME("object_id_selected"), callable_mp(this, &EditorPropertyDictionary::_object_id_selected));
new_prop->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
new_prop->set_draw_background(false);
new_prop->set_use_folding(is_using_folding());