1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 19:02:56 +08:00
osu-lazer/osu.Game/Screens/Edit/Compose/Components
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
..
Timeline Commit active placement when starting drag selection via timeline 2024-06-14 09:32:40 +02:00
BeatDivisorControl.cs Update focus specifications in line with framework changes 2024-05-22 21:32:49 +08:00
BeatDivisorPresetCollection.cs Use new LINQ Order() instead of OrderBy() when possible 2024-02-08 18:01:00 +01:00
BeatDivisorType.cs Remove redundant nullable suppression directives 2023-06-07 08:20:41 +03:00
BeatSnapGrid.cs Add beat snap grid to osu!taiko editor 2023-10-17 16:59:56 +09:00
BlueprintContainer.cs Check if blueprint is in SelectionBlueprints before changing its depth 2024-04-02 07:45:27 -03:00
CircularDistanceSnapGrid.cs Update usage of CircularProgress.Current 2024-03-06 12:13:10 +08:00
ComposeBlueprintContainer.cs Commit active placement when starting drag selection via timeline 2024-06-14 09:32:40 +02:00
DistanceSnapGrid.cs Privatise setter 2023-06-16 16:24:07 +02:00
DragBox.cs Update R# + fix inspections 2024-02-02 21:00:28 +09:00
EditorBlueprintContainer.cs Rectify selection keep-alive logic 2023-11-20 21:57:14 +09:00
EditorInspector.cs Move editor inspector classes out of ruleset namespace 2023-05-05 15:57:38 +09:00
EditorSelectionHandler.cs Fix performance overhead from ternary state bindable callbacks when selection is changing 2024-06-04 10:32:12 +02:00
HitObjectInspector.cs Rename SliderVelocity to SliderVelocityMultiplier to distinguish from Velocity 2023-09-06 19:01:08 +09:00
HitObjectOrderedSelectionContainer.cs Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
LinedPositionSnapGrid.cs fix nitpick 2024-05-24 18:11:28 +02:00
MoveSelectionEvent.cs Automated pass 2023-06-24 01:00:03 +09:00
PositionSnapGrid.cs Remove Masking from PositionSnapGrid 2024-02-01 16:56:57 +01:00
RectangularPositionSnapGrid.cs Added bindables and binding with BindTo 2024-01-01 15:13:11 +01:00
ScrollingDragBox.cs Partial everything 2022-11-27 00:00:27 +09:00
SelectionBox.cs Use better name if we're renaming 2024-05-29 09:40:29 +02:00
SelectionBoxButton.cs Add a visual effect when keyboard shortcuts are used to trigger selection box buttons 2023-06-27 17:01:13 +09:00
SelectionBoxControl.cs Add a visual effect when keyboard shortcuts are used to trigger selection box buttons 2023-06-27 17:01:13 +09:00
SelectionBoxDragHandle.cs Partial everything 2022-11-27 00:00:27 +09:00
SelectionBoxDragHandleContainer.cs change names 2023-08-29 17:25:52 +02:00
SelectionBoxRotationHandle.cs Fix crash when dragging rotation control in editor with both mouse buttons 2024-01-03 13:34:50 +09:00
SelectionBoxScaleHandle.cs Fix aspect ratio lock applying when shift pressed on a non-corner anchor 2024-05-23 15:08:43 +02:00
SelectionHandler.cs Refactor scale handling in editor to facilitate reuse 2024-01-20 00:22:53 +01:00
SelectionRotationHandler.cs Use better name if we're renaming 2024-05-29 09:40:29 +02:00
SelectionScaleHandler.cs refactor CanScaleFromPlayfieldOrigin and GetClampedScale to derived class 2024-05-28 17:12:16 +02:00