diff --git a/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs b/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs index a4efe66bf8c5..472b48425faa 100644 --- a/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs +++ b/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs @@ -229,7 +229,7 @@ bool hasRelevantBank(HitObject hitObject) EditorBeatmap.PerformOnSelection(h => { - if (h.Samples.All(s => s.Bank == bankName)) + if (hasRelevantBank(h)) return; h.Samples = h.Samples.Select(s => s.With(newBank: bankName)).ToList(); @@ -269,10 +269,8 @@ public void AddHitSample(string sampleName) EditorBeatmap.PerformOnSelection(h => { // Make sure there isn't already an existing sample - if (h.Samples.Any(s => s.Name == sampleName)) - return; - - h.Samples.Add(h.CreateHitSampleInfo(sampleName)); + if (h.Samples.All(s => s.Name != sampleName)) + h.Samples.Add(h.CreateHitSampleInfo(sampleName)); if (h is IHasRepeats hasRepeats) {