Skip to content
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 displays incorrect keys in exported dictionaries after deletion of entries #95348

Closed
SgtSmilies opened this issue Aug 10, 2024 · 2 comments · Fixed by #95364
Closed

Comments

@SgtSmilies
Copy link

Tested versions

  • Reproducible in: 4.3.rc3, 4.3.rc2
  • Could not reproduce in: 4.0.3.stable, 4.1.2.stable, 4.2.1.stable

System information

Godot v4.3.rc3 - Windows 10.0.19045

Issue description

Exported dictionaries are displaying incorrect keys in the inspector in v4.3. Given a dictionary with multiple entries in the inspector, deleting an entry that is not the lowest entry will appear to delete the bottom-most key instead of the actually deleted key, while retaining the correct values. For example, with a dictionary that has entries {"A":1, "B":2, "C":3}, deleting entry "B":2 will now display {"A":1, "B":3}.

In addition, after deletion of some values, attempting to create entries that have different keys will conjure the spectre of the deleted entries, displaying the deleted keys instead of the ones you actually entered. Given the previous example, adding an entry of "D":4 will then display {"A":1, "B":3, "C":4}. I noticed another presumably related issue: deleting entries, tabbing away and back, and then undoing will display keys as duplicates of the bottom-most entry.

This appears to be exclusively a display error in the editor. If you highlight a different node and return, the values will display their appropriate values.

This issue appears to be a regression from 4.2.

Steps to reproduce

  1. Open the MRP. Alternatively, export a dictionary and add arbitrary values to it (tested with int, string keys).
  2. Open test.tscn in the editor. Look at the exported dictionary.
  3. Delete any value from the dictionary other than the bottom-most one.
  4. Add a new value to the dictionary other than the one that was just deleted.

Minimal reproduction project (MRP)

dictionary-issue.zip

@kleonc
Copy link
Member

kleonc commented Aug 10, 2024

Not reproducible in v4.3.dev5.official [89f70e9].
Reproducible in v4.3.dev6.official [89850d5].

Likely regression from #88231. cc @ajreckof

@ajreckof
Copy link
Member

Most likely a missing update of the label I'll take a look in the after noon should be easy to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Development

Successfully merging a pull request may close this issue.

4 participants