From 50de525618e7d7c0c3cd4ac38439de40e5c8c0ea Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Wed, 4 Apr 2018 14:12:35 +0300 Subject: [PATCH] vcs: cleanup - unify similar if branches --- .../openapi/vcs/changes/ui/CommitChangeListDialog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java index e647d68c5d2a..278ba689c742 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java @@ -359,15 +359,16 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj setTitle(myShowVcsCommit ? TITLE : trimEllipsis(executors.get(0).getActionText())); myCommitActionName = getCommitActionName(myAffectedVcses); - myCommitAction = myShowVcsCommit ? new CommitAction(myCommitActionName) : null; myExecutorActions = createExecutorActions(executors); - if (myCommitAction != null) { + if (myShowVcsCommit) { + myCommitAction = new CommitAction(myCommitActionName); myCommitAction.setOptions(myExecutorActions); } else { + myCommitAction = null; myExecutorActions.get(0).putValue(DEFAULT_ACTION, Boolean.TRUE); } - myHelpId = myCommitAction != null ? HELP_ID : getHelpId(executors); + myHelpId = myShowVcsCommit ? HELP_ID : getHelpId(executors); myWarningLabel = new JBLabel(); myWarningLabel.setForeground(JBColor.RED);