From cee1fe749f4aba4fc7face484bbfdf4d5805002a Mon Sep 17 00:00:00 2001 From: rinoux Date: Tue, 6 Mar 2018 14:46:56 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-7059=20=E6=95=B0=E6=8D=AE=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/bbs/UserInfoPane.java | 13 ++++++++----- .../src/com/fr/design/file/TemplateTreePane.java | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index 5138654887..0b16bbfaba 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -4,6 +4,7 @@ package com.fr.design.mainframe.bbs; import com.fr.base.FRContext; +import com.fr.config.DBEnv; import com.fr.config.ServerConfig; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; @@ -78,11 +79,13 @@ public class UserInfoPane extends BasicPane{ GeneralContext.addEnvChangedListener(new EnvChangedListener() { @Override public void envChanged() { - String username = ServerConfig.getInstance().getBbsUsername(); - if (StringUtils.isEmpty(username)){ - markUnSignIn(); - } else { - markSignIn(username); + if (DBEnv.isDBEnvAvailable()) { + String username = ServerConfig.getInstance().getBbsUsername(); + if (StringUtils.isEmpty(username)){ + markUnSignIn(); + } else { + markSignIn(username); + } } } }); diff --git a/designer_base/src/com/fr/design/file/TemplateTreePane.java b/designer_base/src/com/fr/design/file/TemplateTreePane.java index b49ad3bee1..69d5b83579 100644 --- a/designer_base/src/com/fr/design/file/TemplateTreePane.java +++ b/designer_base/src/com/fr/design/file/TemplateTreePane.java @@ -320,7 +320,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { try { fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))}); //todo 走下这个流程,否则集群下其它节点无法同步删除 - //FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); + FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); } catch (IOException e) { FRLogger.getLogger().info(e.getMessage()); FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());