From 8b7eb9baefa572b3a88922b159b9c38eee8adbf3 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Thu, 24 Oct 2019 09:42:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-22877=20=E6=A8=A1=E7=89=88=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8E=A7=E5=88=B6=EF=BC=8C=E9=9B=86=E7=BE=A4=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=97=B6=EF=BC=8C=E7=A6=81=E7=94=A8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=80=89=E9=A1=B9=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/PreferencePane.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index d308cbe00..c4728bad6 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -1,6 +1,7 @@ package com.fr.design.actions.file; import com.fr.cluster.ClusterBridge; +import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.config.Configuration; import com.fr.config.ServerPreferenceConfig; import com.fr.design.DesignerEnvManager; @@ -263,7 +264,7 @@ public class PreferencePane extends BasicPane { @Override public void stateChanged(ChangeEvent e) { boolean selected = vcsEnableCheckBox.isSelected(); - if (selected) { + if (selected && vcsEnableCheckBox.isEnabled()) { saveCommitCheckBox.setEnabled(true); saveIntervalEditor.setEnabled(true); useIntervalCheckBox.setEnabled(true); @@ -307,14 +308,9 @@ public class PreferencePane extends BasicPane { gcEnableCheckBox.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - gcButton.setEnabled(gcEnableCheckBox.isSelected()); + gcButton.setEnabled(gcEnableCheckBox.isSelected() && gcEnableCheckBox.isEnabled()); } }); - //集群下禁用 - if (ClusterBridge.isClusterMode()) { - gcEnableCheckBox.setEnabled(false); - gcButton.setEnabled(false); - } return gcControlPane; } @@ -672,6 +668,11 @@ public class PreferencePane extends BasicPane { defaultStringToFormulaBox.setSelected(false); } VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); + if (FineClusterConfig.getInstance().isCluster()) { + vcsEnableCheckBox.setEnabled(false); + gcEnableCheckBox.setEnabled(false); + } + if (VcsHelper.getInstance().needInit()) { vcsEnableCheckBox.setSelected(vcsConfigManager.isVcsEnable()); } else {