From 8871c72285f5d7d7180cb6d848604845c678d787 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 6 Nov 2020 16:34:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/utils/PredefinedStyleUtils.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/PredefinedStyleUtils.java b/designer-base/src/main/java/com/fr/design/utils/PredefinedStyleUtils.java index 7d3429d01c..9b9ae335b9 100644 --- a/designer-base/src/main/java/com/fr/design/utils/PredefinedStyleUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/PredefinedStyleUtils.java @@ -1,11 +1,14 @@ package com.fr.design.utils; -import com.fr.general.GeneralContext; +import com.fr.event.Event; +import com.fr.event.EventDispatcher; +import com.fr.event.Listener; import com.fr.log.FineLoggerFactory; import com.fr.rpc.ExceptionHandler; import com.fr.rpc.RPCInvokerExceptionInfo; -import com.fr.stable.EnvChangedListener; import com.fr.workspace.WorkContext; +import com.fr.workspace.Workspace; +import com.fr.workspace.WorkspaceEvent; import com.fr.workspace.server.predefined.PredefinedStyleOperator; /** @@ -18,9 +21,9 @@ public class PredefinedStyleUtils { private static Boolean allowPredefinedSetting = null; static { - GeneralContext.addEnvChangedListener(new EnvChangedListener() { + EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener() { @Override - public void envChanged() { + public void on(Event event, Workspace param) { allowPredefinedSetting = checkAllowPredefinedSetting(); } });