mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 11:47:24 +08:00
Fix strong context menu operation not being written properly
This commit is contained in:
parent
2bd12e14db
commit
5f1b696387
@ -54,17 +54,17 @@ namespace osu.Game.Rulesets.Taiko.Edit
|
||||
|
||||
public void SetStrongState(bool state)
|
||||
{
|
||||
if (SelectedItems.OfType<Hit>().All(h => h.IsStrong == state))
|
||||
if (SelectedItems.OfType<TaikoStrongableHitObject>().All(h => h.IsStrong == state))
|
||||
return;
|
||||
|
||||
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;
|
||||
EditorBeatmap.Update(taikoHit);
|
||||
strongable.IsStrong = state;
|
||||
EditorBeatmap.Update(strongable);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user