1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:47:46 +08:00
osu-lazer/osu.Game.Rulesets.Mania.Tests/Editor
Bartłomiej Dach bdeea37a44
Commit active placement when starting drag selection via timeline
This was reported in https://github.com/ppy/osu/pull/28474, albeit the
code changes proposed there did not fix the issue at all.

See 8b6385f7d0 for demonstration of the
crash scenario. Basically what is happening there is:

- The starting premise is that there is a spinner placement active.
- At this time, a drag selection is started via the timeline.
- Once the drag selection finds at least one suitable object to select,
  it mutates `SelectedItems`.
- When selection changes for any reason, the `HitObjectComposer`
  decides to switch to the "select" tool, regardless of why
  the selection changed.
- Changing the active tool causes the current placement - if any -
  to be committed, which mutates the beatmap.
- Back at the drag box selection code, this causes a "collection
  modified when enumerating" exception.

The proposed fix here is to eagerly commit active placement - if any -
when drag selection is initiated via the timeline, which avoids this
issue. This also appears to vaguely match stable behaviour and is sort
of consistent with the logic of committing any outstanding changes upon
switching to the selection tool.
2024-06-14 09:32:40 +02:00
..
Checks Fix code quality issues 2024-03-26 10:55:49 +01:00
ManiaPlacementBlueprintTestScene.cs Partial everything 2022-11-27 00:00:27 +09:00
ManiaSelectionBlueprintTestScene.cs Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
TestSceneEditor.cs Automated pass 2023-06-24 01:00:03 +09:00
TestSceneHoldNotePlacementBlueprint.cs Automated pass 2023-06-24 01:00:03 +09:00
TestSceneHoldNoteSelectionBlueprint.cs Automated pass 2023-06-24 01:00:03 +09:00
TestSceneManiaBeatSnapGrid.cs Commit active placement when starting drag selection via timeline 2024-06-14 09:32:40 +02:00
TestSceneManiaComposeScreen.cs Automated pass 2023-06-24 01:00:03 +09:00
TestSceneManiaEditorSaving.cs Add test coverage 2024-06-11 12:28:39 +02:00
TestSceneManiaHitObjectComposer.cs Add test coverage 2024-06-12 15:43:33 +02:00
TestSceneManiaSelectionHandler.cs Add test coverage 2024-06-07 09:19:17 +02:00
TestSceneNotePlacementBlueprint.cs Partial everything 2022-11-27 00:00:27 +09:00
TestSceneNoteSelectionBlueprint.cs Automated pass 2023-06-24 01:00:03 +09:00
TestSceneObjectPlacement.cs Use more generic wording for future-proofing 2023-02-19 15:06:40 +01:00
TestSceneOpenEditorTimestampInMania.cs Reorder and simplify private helper methods 2023-11-21 15:05:51 +09:00