From d4c4c857965f918e62cce3afd8f8642610ed58e9 Mon Sep 17 00:00:00 2001 From: hades Date: Sat, 2 Apr 2022 13:10:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-69009=20mac=E6=96=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=B8=8BgetSelectedFiles=E6=96=B9=E6=B3=95=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ifilechooser/SwingFileChooser.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java index 942c3430c..47abaa8b6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java @@ -32,7 +32,11 @@ class SwingFileChooser implements FileChooserProvider { @Override public File[] getSelectedFiles() { - return fileChooser.getSelectedFiles(); + if (ArrayUtils.isNotEmpty(fileChooser.getSelectedFiles())) { + return fileChooser.getSelectedFiles(); + } else { + return new File[]{fileChooser.getSelectedFile()}; + } } @Override 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 2/2] =?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 9d1cee894..13857c596 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; }