Fix `PopupDialog` potentially accumulating schedules during load

This commit is contained in:
Bartłomiej Dach 2023-07-16 19:43:37 +02:00
parent acb51dfca3
commit cd02a8a9ca
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ public void PerformAction<T>() 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<T>().FirstOrDefault()?.TriggerClick());
Scheduler.AddOnce(() => Buttons.OfType<T>().FirstOrDefault()?.TriggerClick());
}
protected override bool OnKeyDown(KeyDownEvent e)