Ensure EditorBeatmap.Update is called inside PerformOnSelection calls

This commit is contained in:
Dean Herbert
2021-05-23 21:19:38 +09:00
parent dc322d1c63
commit 4c9d72e62a
4 changed files with 23 additions and 4 deletions

View File

@ -125,6 +125,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
return;
h.Samples.Add(new HitSampleInfo(sampleName));
EditorBeatmap.Update(h);
});
}
@ -134,7 +135,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// <param name="sampleName">The name of the hit sample.</param>
public void RemoveHitSample(string sampleName)
{
EditorBeatmap.PerformOnSelection(h => h.SamplesBindable.RemoveAll(s => s.Name == sampleName));
EditorBeatmap.PerformOnSelection(h =>
{
h.SamplesBindable.RemoveAll(s => s.Name == sampleName);
EditorBeatmap.Update(h);
});
}
/// <summary>