Browse Source

REPORT-67986 显示结果调整

feature/x
xiqiu 3 years ago
parent
commit
7b5754b179
  1. 17
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java

17
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -1495,17 +1495,13 @@ public class FILEChooserPane extends BasicPane {
btn_text = webAppName; btn_text = webAppName;
} }
node_start = matcher.end(); node_start = matcher.end();
if (needTopPath) { if (needTopPath && topPath.equals(btn_text)) {
if (topPath.equals(btn_text)) {
needTopPath = false; needTopPath = false;
} else {
continue;
}
} }
this.buttonList.add(createBlankButton((new SetDirectoryAction(btn_text + '/', this.buttonList.add(createBlankButton((new SetDirectoryAction(btn_text + '/',
// alex:dir.prefix不和btn_path一起参与pathJoin,因为btn_path是否以/打头在unix,linux // alex:dir.prefix不和btn_path一起参与pathJoin,因为btn_path是否以/打头在unix,linux
// OS中意义很不一样 // OS中意义很不一样
FILEFactory.createFolder(dir.prefix() + StableUtils.pathJoin(btn_path, "/")))))); FILEFactory.createFolder(dir.prefix() + StableUtils.pathJoin(btn_path, "/")), !needTopPath))));
} }
maxPathIndex = calculateMaxPathIndex(); maxPathIndex = calculateMaxPathIndex();
@ -1606,6 +1602,7 @@ public class FILEChooserPane extends BasicPane {
private class SetDirectoryAction extends UpdateAction { private class SetDirectoryAction extends UpdateAction {
private FILE dir; private FILE dir;
private boolean response = true;
public SetDirectoryAction(String name) { public SetDirectoryAction(String name) {
this.setName(name); this.setName(name);
@ -1617,9 +1614,15 @@ public class FILEChooserPane extends BasicPane {
this.dir = file; this.dir = file;
} }
public SetDirectoryAction(String name, FILE file, boolean response) {
this.setName(name);
this.dir = file;
this.response = response;
}
@Override @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
if (dir != null) { if (dir != null && response) {
setSelectedDirectory(dir); setSelectedDirectory(dir);
} }
} }

Loading…
Cancel
Save