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:
parent
f48a9ba90a
commit
f9d9e6aa61
@ -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();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user