Skip to content

Commit

Permalink
Merge pull request #1438 from andy840119/delay-clear-selection-hitobject
Browse files Browse the repository at this point in the history
Fix will cause crash if switch from translate screen to singer screen.
  • Loading branch information
andy840119 authored Jul 12, 2022
2 parents 646e4a8 + f93b26b commit 755f3a2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ protected override void PopIn()
{
base.PopIn();

// for prevent accidentally change the property in the hit object that is not expected,
// should clear all selected hit object if user change to the different tab.
beatmap.SelectedHitObjects.Clear();
// should wait until current change handler done.
// not a good way but ok for now.
ScheduleAfterChildren(() =>
{
// for prevent accidentally change the property in the hit object that is not expected,
// should clear all selected hit object if user change to the different tab.
beatmap.SelectedHitObjects.Clear();
});
}
}
}

0 comments on commit 755f3a2

Please sign in to comment.