1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 14:37:30 +08:00

Fix strong context menu operation not being written properly

This commit is contained in:
Bartłomiej Dach 2024-11-04 15:21:29 +01:00
parent 2bd12e14db
commit 5f1b696387
No known key found for this signature in database

View File

@ -54,17 +54,17 @@ namespace osu.Game.Rulesets.Taiko.Edit
public void SetStrongState(bool state) public void SetStrongState(bool state)
{ {
if (SelectedItems.OfType<Hit>().All(h => h.IsStrong == state)) if (SelectedItems.OfType<TaikoStrongableHitObject>().All(h => h.IsStrong == state))
return; return;
EditorBeatmap.PerformOnSelection(h => EditorBeatmap.PerformOnSelection(h =>
{ {
if (!(h is Hit taikoHit)) return; if (h is not TaikoStrongableHitObject strongable) return;
if (taikoHit.IsStrong != state) if (strongable.IsStrong != state)
{ {
taikoHit.IsStrong = state; strongable.IsStrong = state;
EditorBeatmap.Update(taikoHit); EditorBeatmap.Update(strongable);
} }
}); });
} }