Merge pull request #10137 from peppy/editor-exit-dialog-fix

Avoid editor confirm-save dialog looping infinitely when using keyboard shortcut to exit
This commit is contained in:
Dan Balasescu 2020-09-11 20:30:19 +09:00 committed by GitHub
commit 56b129eb93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ public override void OnEntering(IScreen last)
public override bool OnExiting(IScreen next)
{
if (!exitConfirmed && dialogOverlay != null && HasUnsavedChanges)
if (!exitConfirmed && dialogOverlay != null && HasUnsavedChanges && !(dialogOverlay.CurrentDialog is PromptForSaveDialog))
{
dialogOverlay?.Push(new PromptForSaveDialog(confirmExit, confirmExitWithSave));
return true;