mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Merge branch 'editor-fix-multiple-selection' into editor-clipboard
This commit is contained in:
@ -145,16 +145,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// <param name="blueprint">The blueprint.</param>
|
/// <param name="blueprint">The blueprint.</param>
|
||||||
internal void HandleSelected(SelectionBlueprint blueprint)
|
internal void HandleSelected(SelectionBlueprint blueprint)
|
||||||
{
|
{
|
||||||
if (!selectedBlueprints.Contains(blueprint))
|
selectedBlueprints.Add(blueprint);
|
||||||
{
|
|
||||||
selectedBlueprints.Add(blueprint);
|
|
||||||
|
|
||||||
// need to check this as well, as there are potentially multiple SelectionHandlers and the above check is not enough.
|
// there are potentially multiple SelectionHandlers active, but we only want to add hitobjects to the selected list once.
|
||||||
if (!EditorBeatmap.SelectedHitObjects.Contains(blueprint.HitObject))
|
if (!EditorBeatmap.SelectedHitObjects.Contains(blueprint.HitObject))
|
||||||
EditorBeatmap.SelectedHitObjects.Add(blueprint.HitObject);
|
EditorBeatmap.SelectedHitObjects.Add(blueprint.HitObject);
|
||||||
|
|
||||||
UpdateVisibility();
|
UpdateVisibility();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -163,12 +160,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// <param name="blueprint">The blueprint.</param>
|
/// <param name="blueprint">The blueprint.</param>
|
||||||
internal void HandleDeselected(SelectionBlueprint blueprint)
|
internal void HandleDeselected(SelectionBlueprint blueprint)
|
||||||
{
|
{
|
||||||
if (selectedBlueprints.Remove(blueprint))
|
selectedBlueprints.Remove(blueprint);
|
||||||
{
|
|
||||||
EditorBeatmap.SelectedHitObjects.Remove(blueprint.HitObject);
|
|
||||||
|
|
||||||
UpdateVisibility();
|
EditorBeatmap.SelectedHitObjects.Remove(blueprint.HitObject);
|
||||||
}
|
|
||||||
|
UpdateVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Reference in New Issue
Block a user