mirror of https://github.com/ppy/osu
Fix popup dialog potentially not clicking last button when dismissed
This commit is contained in:
parent
bc839be4d8
commit
21e1f4546a
|
@ -100,10 +100,6 @@ public IEnumerable<PopupDialogButton> Buttons
|
|||
}
|
||||
}
|
||||
|
||||
// We always want dialogs to show their appear animation, so we request they start hidden.
|
||||
// Normally this would not be required, but is here due to the manual Show() call that occurs before LoadComplete().
|
||||
protected override bool StartHidden => true;
|
||||
|
||||
protected PopupDialog()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
@ -272,7 +268,7 @@ protected override void PopIn()
|
|||
|
||||
protected override void PopOut()
|
||||
{
|
||||
if (!actionInvoked && content.IsPresent)
|
||||
if (!actionInvoked)
|
||||
// In the case a user did not choose an action before a hide was triggered, press the last button.
|
||||
// This is presumed to always be a sane default "cancel" action.
|
||||
buttonsContainer.Last().TriggerClick();
|
||||
|
|
Loading…
Reference in New Issue