Fix cancel button animating when entering a dialog (#6825)

Fix cancel button animating when entering a dialog

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert
2019-11-21 23:22:17 +09:00
committed by GitHub

View File

@ -241,7 +241,7 @@ namespace osu.Game.Overlays.Dialog
protected override void PopOut()
{
if (!actionInvoked)
if (!actionInvoked && content.IsPresent)
// 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().Click();