-
-
Notifications
You must be signed in to change notification settings - Fork 23.9k
Fix edit resource on inspector when inside array or dictionary #106099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Nice first PR and thanks for your contribution. It seems your trying to merge your |
refactor Fix dictionary
ajreckof
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
|
If you use Resource as Dictionary key, it still can't be edited, despite showing Edit option (it does nothing). |
|
as the key should not be editable I'm not sur it should show this context menu at all. Most likely it should show the context popup menu of the editorProperty of the value as there is in array. Normally this si not to edit the key but only to show the key and replace the label of the |
|
Thanks! Congratulations on your first merged contribution! 🎉 |
Fixes #91473 - First PR (first time using C++)
Fixes Inspector not opening Resource from inside Array or Dictionary when
clicking "Edit", by properly signaling
resource_selected.When clicking "Edit" on a Resource in the Inspector, the
resource_selectedsignal is emitted. This works correctly when the Resource is a standalone
exported property, and the signal reaches
EditorInspector::_resource_selected.However, when the Resource is stored inside an Array or Dictionary, the signal
was not reaching the EditorInspector, because it was blocked by the container
property (Array/Dictionary) in between.
This fix forwards the
resource_selectedsignal from the nested Resourcethrough the container (Array or Dictionary), up to the Inspector, allowing it
to display the selected Resource as expected.