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:
parent
2bd12e14db
commit
5f1b696387
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user