From d03d97d7e6987706cb047f216f22e7ed23fef916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Sat, 2 Apr 2022 19:04:47 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-69163=20=E6=96=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=9A=84kr=E8=AE=BE=E8=AE=A1=E5=99=A8=20=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8frm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/FormWidgetDetailPane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 9d1cee8941..13857c5968 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 @@ -34,6 +34,7 @@ import java.util.List; * Time: 下午8:18 */ public class FormWidgetDetailPane extends FormDockView{ + private static final int LOCAL_TAB = 0; private static final int ONLINE_TAB = 1; private JPanel centerPane; @@ -106,11 +107,15 @@ public class FormWidgetDetailPane extends FormDockView{ cardLayout.show(centerPane, paneList.get(newSelectedIndex).getTitle()); } }; - headGroup.setSelectedIndex(ComponentReuseNotificationInfo.getInstance().isClickedWidgetLib() ? 0 : ONLINE_TAB); + headGroup.setSelectedIndex(isNeedSwitchToOnlineTab() ? ONLINE_TAB : LOCAL_TAB); this.add(headGroup, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); } + private boolean isNeedSwitchToOnlineTab() { + return !ComponentReuseNotificationInfo.getInstance().isClickedWidgetLib() && isShowOnlineWidgetRepoPane(); + } + public void resetEmptyPane(){ this.isEmptyPane = false; }