From cd02a8a9ca599b26304f3ef7b39796bbf2c8a68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 16 Jul 2023 19:43:37 +0200 Subject: [PATCH] Fix `PopupDialog` potentially accumulating schedules during load --- osu.Game/Overlays/Dialog/PopupDialog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index d7316305cc..2e9087fdbd 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -229,7 +229,7 @@ public void PerformAction() where T : PopupDialogButton { // Buttons are regularly added in BDL or LoadComplete, so let's schedule to ensure // they are ready to be pressed. - Schedule(() => Buttons.OfType().FirstOrDefault()?.TriggerClick()); + Scheduler.AddOnce(() => Buttons.OfType().FirstOrDefault()?.TriggerClick()); } protected override bool OnKeyDown(KeyDownEvent e)