1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Ensure popup dialogs are hidden before running any associated actions

This commit is contained in:
Dean Herbert 2022-04-14 15:58:03 +09:00
parent f48a9ba90a
commit f9d9e6aa61

View File

@ -87,10 +87,13 @@ namespace osu.Game.Overlays.Dialog
{
if (actionInvoked) return;
// Hide the dialog before running the action.
// This is important as the code which is performed may check for a dialog being present (ie. `OsuGame.PerformFromScreen`)
// and we don't want it to see the already dismissed dialog.
Hide();
actionInvoked = true;
action?.Invoke();
Hide();
};
}
}