Skip to content

Conversation

@xefensor
Copy link
Contributor

@xefensor xefensor commented May 5, 2025

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_selected
signal 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_selected signal from the nested Resource
through the container (Array or Dictionary), up to the Inspector, allowing it
to display the selected Resource as expected.

@AThousandShips AThousandShips added bug topic:editor cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels May 6, 2025
@AThousandShips AThousandShips added this to the 4.5 milestone May 6, 2025
@SatLess
Copy link
Contributor

SatLess commented Sep 17, 2025

Nice first PR and thanks for your contribution.

It seems your trying to merge your master branch into Godot's master. I'm not entirely certain, but I believe that's the reason why there's some branch conflict going on.
If needed, here's the usual workflow for the pull request: https://docs.godotengine.org/en/4.4/contributing/workflow/pr_workflow.html

@Repiteo Repiteo added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 18, 2025
@Repiteo Repiteo modified the milestones: 4.5, 4.x Sep 18, 2025
@xefensor xefensor requested a review from a team as a code owner October 6, 2025 10:33
Copy link
Member

@ajreckof ajreckof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.

@akien-mga akien-mga removed cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Oct 7, 2025
@akien-mga akien-mga modified the milestones: 4.x, 4.6 Oct 7, 2025
@akien-mga akien-mga requested a review from KoBeWi October 7, 2025 11:42
@KoBeWi
Copy link
Member

KoBeWi commented Oct 28, 2025

If you use Resource as Dictionary key, it still can't be edited, despite showing Edit option (it does nothing).

@ajreckof
Copy link
Member

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 EditorProperty. I think this can be merged without this one working as it is very niche and most likely he won't stay. If the possibility to directly edit from the popup menu it can later be added to the popup menu at the same time as edit key is added (it would be possible even without that by editing key and then doing right click edit the same as for the value right now.

@Repiteo Repiteo merged commit f3c44f0 into godotengine:master Nov 7, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 7, 2025

Thanks! Congratulations on your first merged contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release topic:editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't edit resource on inspector when inside array

7 participants