1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Merge pull request #10271 from peppy/editor-fix-unnecessary-updates

Avoid unnecessary object updates from SelectionHandlers
This commit is contained in:
Dan Balasescu 2020-09-28 16:13:26 +09:00 committed by GitHub
commit 3fd8830f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -57,7 +57,13 @@ namespace osu.Game.Rulesets.Taiko.Edit
ChangeHandler.BeginChange();
foreach (var h in hits)
h.IsStrong = state;
{
if (h.IsStrong != state)
{
h.IsStrong = state;
EditorBeatmap.UpdateHitObject(h);
}
}
ChangeHandler.EndChange();
}

View File

@ -288,8 +288,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
{
var comboInfo = h as IHasComboInformation;
if (comboInfo == null)
continue;
if (comboInfo == null || comboInfo.NewCombo == state) continue;
comboInfo.NewCombo = state;
EditorBeatmap?.UpdateHitObject(h);