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 deleting modified difficulty via editor leaving user in broken state #27996

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Apr 25, 2024

Closes #22783.

If the difficulty being edited has unsaved changes, the editor exit flow would prompt for save after the deletion method has run. This is undesirable from a UX standpoint, and also leaves the user in a broken state.

Thus, just fake an update of the last saved hash of the beatmap to fool the editor into thinking that it's not dirty, so that the exit flow will not show a save dialog.

Closes ppy#22783.

If the difficulty being edited has unsaved changes, the editor exit flow
would prompt for save *after* the deletion method has run. This is
undesirable from a UX standpoint, and also leaves the user in a broken
state.

Thus, just fake an update of the last saved hash of the beatmap to fool
the editor into thinking that it's not dirty, so that the exit flow will
not show a save dialog.
Copy link
Sponsor Member

@peppy peppy left a comment

Choose a reason for hiding this comment

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

makes sense

@peppy peppy merged commit 6a8a6fa into ppy:master Apr 25, 2024
10 of 11 checks passed
@bdach bdach deleted the delete-dirty-difficulty-droken branch April 25, 2024 13:21
@peppy peppy self-requested a review April 26, 2024 01:19
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.

Creating a new difficulty, renaming, then deleting it and continuing the editing process causes errors
2 participants