From f93b26b79b630ce6387cd303719b0c641a048fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=BA=E4=BB=80=E9=BA=BC?= Date: Tue, 12 Jul 2022 22:53:34 +0800 Subject: [PATCH] Some of the change handler step might be a little bit late(e.g: submit the text from the textbox) So make clear selected hit objects step a little bit late. --- osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorScreen.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorScreen.cs index ec3fa167d..71f1ddb83 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorScreen.cs @@ -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(); + }); } } }