From 847b2938a48db4b57a347ac39dfee6dd31d5c126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 23 Dec 2021 11:15:11 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-64451=20=E6=9C=80=E6=96=B0=E5=AE=98?= =?UTF-8?q?=E7=BD=91jar=E5=8C=85=EF=BC=8C11.0=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=88=90=E8=8B=B1=E6=96=87=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/share/ComponentShareUtil.java | 10 +++++++++- .../fr/design/mainframe/FormWidgetDetailPane.java | 13 +++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java b/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java index dbf9839935..cec7fbc8fc 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java @@ -2,11 +2,14 @@ package com.fr.design.mainframe.share; import com.fr.design.DesignerEnvManager; import com.fr.design.file.HistoryTemplateListCache; +import com.fr.design.locale.impl.ShowOnlineWidgetMark; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; import com.fr.form.share.constants.ComponentPath; import com.fr.form.share.group.filter.ReuFilter; import com.fr.design.DesignerCloudURLManager; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.workspace.WorkContext; /** @@ -23,7 +26,12 @@ public class ComponentShareUtil { * @return */ public static boolean needSwitch2OnlineTab() { - return DesignerCloudURLManager.getInstance().isConnected() && !hasTouched() && isCurrentTplNewCreate(); + return DesignerCloudURLManager.getInstance().isConnected() && !hasTouched() && isCurrentTplNewCreate() && isShowOnlineWidgetRepoPane(); + } + + public static boolean isShowOnlineWidgetRepoPane() { + LocaleMark localeMark = LocaleCenter.getMark(ShowOnlineWidgetMark.class); + return localeMark.getValue(); } /** diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java index 93427ab2bb..5453ca61da 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -6,13 +6,11 @@ import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.locale.impl.ShowOnlineWidgetMark; -import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.ComponentShareUtil; +import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane; -import com.fr.general.locale.LocaleCenter; -import com.fr.general.locale.LocaleMark; + import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JPanel; @@ -190,14 +188,9 @@ public class FormWidgetDetailPane extends FormDockView { private void initPaneList() { paneList = new ArrayList<>(); paneList.add(LocalWidgetRepoPane.getInstance()); - if (isShowOnlineWidgetRepoPane()) { + if (ComponentShareUtil.isShowOnlineWidgetRepoPane()) { OnlineWidgetRepoPane.getInstance().refresh(); paneList.add(OnlineWidgetRepoPane.getInstance()); } } - - private boolean isShowOnlineWidgetRepoPane() { - LocaleMark localeMark = LocaleCenter.getMark(ShowOnlineWidgetMark.class); - return localeMark.getValue(); - } }