From 9dbc09708d3e79273b6e16cee176b52d54816c16 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 23 Mar 2017 10:17:16 -0700 Subject: [PATCH] Don't show help button if there is no help available --- .../src/com/intellij/openapi/ui/DialogWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index a269c9265d9a..764273313593 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -1080,7 +1080,11 @@ public abstract class DialogWrapper { */ @NotNull protected Action[] createActions() { - return new Action[]{getOKAction(), getCancelAction(), getHelpAction()}; + Action helpAction = getHelpAction(); + + return helpAction == myHelpAction && getHelpId() == null + ? new Action[]{getOKAction(), getCancelAction()} + : new Action[]{getOKAction(), getCancelAction(), helpAction}; } @NotNull