Browse Source

Merge pull request #8422 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '6f5239a2db54fbe78160fd5e6c15981f2eaedef6':
  REPORT-69163 新安装的kr设计器 无法使用frm
  REPORT-69009 mac新系统下getSelectedFiles方法返回为空
bugfix/10.0
superman 3 years ago
parent
commit
d6b20cc909
  1. 6
      designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java
  2. 7
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java

6
designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java

@ -32,7 +32,11 @@ class SwingFileChooser implements FileChooserProvider {
@Override @Override
public File[] getSelectedFiles() { public File[] getSelectedFiles() {
return fileChooser.getSelectedFiles(); if (ArrayUtils.isNotEmpty(fileChooser.getSelectedFiles())) {
return fileChooser.getSelectedFiles();
} else {
return new File[]{fileChooser.getSelectedFile()};
}
} }
@Override @Override

7
designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -34,6 +34,7 @@ import java.util.List;
* Time: 下午8:18 * Time: 下午8:18
*/ */
public class FormWidgetDetailPane extends FormDockView{ public class FormWidgetDetailPane extends FormDockView{
private static final int LOCAL_TAB = 0;
private static final int ONLINE_TAB = 1; private static final int ONLINE_TAB = 1;
private JPanel centerPane; private JPanel centerPane;
@ -106,11 +107,15 @@ public class FormWidgetDetailPane extends FormDockView{
cardLayout.show(centerPane, paneList.get(newSelectedIndex).getTitle()); 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(headGroup, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }
private boolean isNeedSwitchToOnlineTab() {
return !ComponentReuseNotificationInfo.getInstance().isClickedWidgetLib() && isShowOnlineWidgetRepoPane();
}
public void resetEmptyPane(){ public void resetEmptyPane(){
this.isEmptyPane = false; this.isEmptyPane = false;
} }

Loading…
Cancel
Save