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

Fix map editor not removing an actor properly. #21354

Merged
merged 1 commit into from
Mar 28, 2024

Commits on Mar 27, 2024

  1. Fix map editor not removing an actor properly.

    If you edit an actor name, then delete the actor - it fails to be removed from the map in the editor. This is because the actor previews are keyed by ID. Editing their name edits their ID and breaks the stability of their hash code. This unstable hash code means the preview will now fail to be removed from collections, even though it's the "same" object.
    
    Fix this by making the ID immutable to ensure hash stability - this means that a preview can be added and removed from collections successfully. Now when we edit the ID in the UI, we can't update the ID in place on the preview. Instead we must generate a new preview with the correct ID and swap it with the preview currently in use.
    RoosterDragon committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    8c8faf0 View commit details
    Browse the repository at this point in the history