diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt index 22b8a3db17d1..252fcead561d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt @@ -5,6 +5,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.vcs.AbstractVcsHelper import com.intellij.openapi.vcs.changes.ChangesUtil import com.intellij.ui.SimpleTextAttributes +import com.intellij.util.FontUtil import java.util.stream.Collectors /** @@ -12,7 +13,8 @@ import java.util.stream.Collectors */ class ChangesBrowserConflictsNode(val project: Project) : ChangesBrowserNode(Unit) { override fun render(renderer: ChangesBrowserNodeRenderer, selected: Boolean, expanded: Boolean, hasFocus: Boolean) { - renderer.append("Merge Conflicts ", SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) + renderer.append("Merge Conflicts", SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) + renderer.append(FontUtil.spaceAndThinSpace(), SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) renderer.append("Resolve", SimpleTextAttributes.LINK_BOLD_ATTRIBUTES, Runnable { showResolveConflictsDialog() }) } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java index 137b069ebad5..e5cc7aee7962 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java @@ -497,7 +497,6 @@ public class AbstractVcsHelperImpl extends AbstractVcsHelper { final MultipleFileMergeDialog fileMergeDialog = new MultipleFileMergeDialog(myProject, files, provider, mergeDialogCustomizer); AppIcon.getInstance().requestAttention(myProject, true); fileMergeDialog.show(); - provider.mergeDone(files); return fileMergeDialog.getProcessedFiles(); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java index 81b8affbf695..176c1a509446 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.vcs.merge; @@ -199,6 +185,14 @@ public class MultipleFileMergeDialog extends DialogWrapper { }); } + @Override + public void doCancelAction() { + if (!myProcessedFiles.isEmpty()) { + myProvider.mergeDone(myProcessedFiles); + } + super.doCancelAction(); + } + private void updateButtonState() { boolean haveSelection = myTable.getSelectedRowCount() > 0; boolean haveUnmergeableFiles = false;