mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Ensure selection tool correctly matches selection state
- When a selection is made (via the timeline) the selection tool should become the select tool. - When the selection tool is changed to anything *but* the select tool, the selection should be cleared.
This commit is contained in:
@ -74,12 +74,16 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
foreach (var o in objects)
|
||||
selectionBlueprints.FirstOrDefault(b => b.HitObject == o)?.Select();
|
||||
|
||||
SelectionChanged?.Invoke(selectedHitObjects);
|
||||
};
|
||||
|
||||
selectedHitObjects.ItemsRemoved += objects =>
|
||||
{
|
||||
foreach (var o in objects)
|
||||
selectionBlueprints.FirstOrDefault(b => b.HitObject == o)?.Deselect();
|
||||
|
||||
SelectionChanged?.Invoke(selectedHitObjects);
|
||||
};
|
||||
}
|
||||
|
||||
@ -332,8 +336,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
selectionHandler.HandleSelected(blueprint);
|
||||
selectionBlueprints.ChangeChildDepth(blueprint, 1);
|
||||
beatmap.SelectedHitObjects.Add(blueprint.HitObject);
|
||||
|
||||
SelectionChanged?.Invoke(selectionHandler.SelectedHitObjects);
|
||||
}
|
||||
|
||||
private void onBlueprintDeselected(SelectionBlueprint blueprint)
|
||||
@ -341,8 +343,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
selectionHandler.HandleDeselected(blueprint);
|
||||
selectionBlueprints.ChangeChildDepth(blueprint, 0);
|
||||
beatmap.SelectedHitObjects.Remove(blueprint.HitObject);
|
||||
|
||||
SelectionChanged?.Invoke(selectionHandler.SelectedHitObjects);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user