-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Inspector: Fix clearing array/dictionary element with <Object#null>
#84237
Inspector: Fix clearing array/dictionary element with <Object#null>
#84237
Conversation
I don't really understand the issue. Assigning |
Because a |
But the array works correctly when first resized. So it has a different value than after using Clear it seems, and there is no way to restore it. |
To resize, the editor probably calls the array method, which works correctly. Copying |
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.
Maybe the comment should be more descriptive ("GH-#" is very specific, but it requires you to lookup the issue).
@dalexeev Would you mind updating the comment to say a bit more about the reason for the code's existence? You can still add |
c751ae0
to
ed86c33
Compare
@YuriSizov Added comments and rebased the branch. |
Thanks! |
Cherry-picked for 4.2.1. |
EditorPropertyArray
andEditorPropertyDictionary
useEditorPropertyResource
andEditorResourcePicker
, but array elements and dictionary keys/values can beVariant()
(null
), unlikeRef<Resource>
.godot/editor/editor_resource_picker.cpp
Lines 346 to 350 in 93cdacb