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 crash when attempting to adjust duration of break that has no preceding/succeeding objects #28580

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Jun 25, 2024

Additionally contains a fix to the break autogeneration logic which makes it so that manually-adjusted breaks which are placed before/after all objects are removed (they would previously persist which is undesirable). This was the secondary cause of the issue, because you could do the following:

  • Have a break autogenerate itself
  • Adjust either end of it to make it mark itself as manually-adjusted
  • Remove all objects before or after said break

to get a break that would cause a crash when attempting to drag either end of it.

…ore start or after end

This fixes the direct cause of ppy#28577.
This is the secondary cause of ppy#28577,
because you could do the following:

- Have a break autogenerate itself
- Adjust either end of it to make it mark itself as manually-adjusted
- Remove all objects before or after said break

to end up in a state wherein there are no objects before or after a
break.

The direct fix is still correct because it is still technically possible
to end up in a state wherein a break is before or after all objects
(obvious one is manual `.osu` editing), but this behaviour is also
undesirable for the autogeneration logic.
@bdach bdach added the next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! label Jun 25, 2024
@peppy peppy self-requested a review June 25, 2024 11:18
@peppy peppy merged commit 6cd1367 into ppy:master Jun 25, 2024
10 of 11 checks passed
@bdach bdach deleted the fix-breaks branch June 25, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editor next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! size/L type:reliability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.InvalidOperationException: Sequence contains no matching element
2 participants