From 5f320c106e56a94d783554190dd933c0f22f2452 Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Thu, 23 Sep 2010 17:14:20 +0400 Subject: [PATCH] IDEA-57522 Exit confirmation dialog default and focused buttons --- .../intellij/openapi/application/impl/ConfirmExitDialog.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/application/impl/ConfirmExitDialog.java b/platform/platform-impl/src/com/intellij/openapi/application/impl/ConfirmExitDialog.java index f1cc095cb992..0bf8c59e6cde 100644 --- a/platform/platform-impl/src/com/intellij/openapi/application/impl/ConfirmExitDialog.java +++ b/platform/platform-impl/src/com/intellij/openapi/application/impl/ConfirmExitDialog.java @@ -43,7 +43,9 @@ public class ConfirmExitDialog extends OptionsDialog { protected Action[] createActions() { setOKButtonText(CommonBundle.getYesButtonText()); setCancelButtonText(CommonBundle.getNoButtonText()); - return new Action[] {getOKAction(), getCancelAction()}; + final Action cancelAction = getCancelAction(); + cancelAction.putValue(FOCUSED_ACTION, Boolean.TRUE); + return new Action[] {getOKAction(), cancelAction}; } protected boolean isToBeShown() {