mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 11:02:57 +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;
|
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;
|
actionInvoked = true;
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
|
|
||||||
Hide();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user