From c2857a75a51bfedbd90db42b6df502a32bf7dbf2 Mon Sep 17 00:00:00 2001 From: Konstantin Kolosovsky Date: Fri, 27 Sep 2019 14:08:31 +0300 Subject: [PATCH] vcs: non-modal: Hide commit panel after commit checks succeeded If toggling commit panel visibility is enabled GitOrigin-RevId: ff0d48a6c38a6241defcbd4f620f25515926d2e0 --- .../intellij/vcs/commit/ChangesViewCommitWorkflowHandler.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/vcs/commit/ChangesViewCommitWorkflowHandler.kt b/platform/vcs-impl/src/com/intellij/vcs/commit/ChangesViewCommitWorkflowHandler.kt index e47c4e88bd8d..5d9d9d0c69e8 100644 --- a/platform/vcs-impl/src/com/intellij/vcs/commit/ChangesViewCommitWorkflowHandler.kt +++ b/platform/vcs-impl/src/com/intellij/vcs/commit/ChangesViewCommitWorkflowHandler.kt @@ -13,6 +13,7 @@ import com.intellij.openapi.vcs.VcsConfiguration import com.intellij.openapi.vcs.VcsException import com.intellij.openapi.vcs.changes.* import com.intellij.openapi.vcs.changes.actions.DefaultCommitExecutorAction +import com.intellij.openapi.vcs.checkin.CheckinHandler import com.intellij.vcs.commit.AbstractCommitWorkflow.Companion.getCommitExecutors import gnu.trove.THashSet @@ -157,6 +158,11 @@ class ChangesViewCommitWorkflowHandler( super.inclusionChanged() } + override fun beforeCommitChecksEnded(isDefaultCommit: Boolean, result: CheckinHandler.ReturnResult) { + super.beforeCommitChecksEnded(isDefaultCommit, result) + if (isToggleCommitUi.asBoolean() && result == CheckinHandler.ReturnResult.COMMIT) ui.deactivate() + } + override fun updateWorkflow() { workflow.commitState = getCommitState() }