mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 00:13:19 +08:00
Fix potentially incorrect button being pressed during PopupDialog
hide due to flag set too late
This commit is contained in:
parent
58d5cf4560
commit
1fdf742d38
@ -87,12 +87,13 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
{
|
{
|
||||||
if (actionInvoked) return;
|
if (actionInvoked) return;
|
||||||
|
|
||||||
|
actionInvoked = true;
|
||||||
|
|
||||||
// Hide the dialog before running the action.
|
// 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`)
|
// 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.
|
// and we don't want it to see the already dismissed dialog.
|
||||||
Hide();
|
Hide();
|
||||||
|
|
||||||
actionInvoked = true;
|
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user