Browse Source

Pull request #7609: REPORT-65722 设计器点击选择按钮控件图标时无反应,没有出现原生文件选择器弹窗 同步到11.0

Merge in DESIGN/design from ~HADES/design:final/11.0 to final/11.0

* commit '822a1b2a6f8903c662ed3df3a7275af3674b9181':
  REPORT-65722  设计器点击选择按钮控件图标时无反应,没有出现原生文件选择器弹窗 同步到11.0
new-design
Hades 3 years ago
parent
commit
52cf2958a8
  1. 14
      designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java

14
designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java

@ -197,7 +197,9 @@ public class JavaFxNativeFileChooser implements FileChooserProvider {
private File currentDirectory;
public Builder fileSelectionMode(FileSelectionMode fileSelectionMode) {
this.fileSelectionMode = fileSelectionMode;
if (fileSelectionMode != null) {
this.fileSelectionMode = fileSelectionMode;
}
return this;
}
@ -209,13 +211,17 @@ public class JavaFxNativeFileChooser implements FileChooserProvider {
}
public Builder filters(FileChooser.ExtensionFilter[] filters) {
this.filters = filters;
if (filters != null) {
this.filters = filters;
}
return this;
}
public Builder filters(ExtensionFilter[] filters) {
for (ExtensionFilter filter : filters) {
this.filters = ArrayUtils.add(this.filters, new FileChooser.ExtensionFilter(filter.getDes(), filter.getExtensions()));
if (filters != null) {
for (ExtensionFilter filter : filters) {
this.filters = ArrayUtils.add(this.filters, new FileChooser.ExtensionFilter(filter.getDes(), filter.getExtensions()));
}
}
return this;
}

Loading…
Cancel
Save