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

Implement better logic for ApplyStateChange in skin editor #23344

Merged
merged 12 commits into from
May 3, 2023

Conversation

Terochi
Copy link
Contributor

@Terochi Terochi commented Apr 30, 2023

This PR improves on the naive approach of ISerialisableDrawableContainer.Reload() when traversing through history of changes to keep as many components as possible rather than creating new ones.

Also fixes the first state when opening editor/changing layer not being saved.

osu.Game/Overlays/SkinEditor/SkinEditor.cs Outdated Show resolved Hide resolved
osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs Outdated Show resolved Hide resolved
osu.Game/Overlays/SkinEditor/SkinEditor.cs Outdated Show resolved Hide resolved
osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs Outdated Show resolved Hide resolved
osu.Game/Overlays/SkinEditor/SkinEditorChangeHandler.cs Outdated Show resolved Hide resolved
osu.Game/Overlays/SkinEditor/SkinEditorChangeHandler.cs Outdated Show resolved Hide resolved
@Terochi Terochi requested a review from bdach April 30, 2023 18:32
Terochi and others added 4 commits May 1, 2023 12:53
Having `typedComponents` and `typeComponents` next to each other is
asking for trouble.
Leaving only the ones that add anything useful and do not restate the
code verbatim.
Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

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

I've applied a few stylistic cleanups, but looks good otherwise.

@bdach bdach enabled auto-merge May 3, 2023 17:43
@bdach bdach disabled auto-merge May 3, 2023 18:36
@bdach bdach merged commit 2bd07cc into ppy:master May 3, 2023
@Terochi Terochi deleted the skin-editor-change-handler-improvement branch May 3, 2023 18:50
@bdach bdach mentioned this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants