Browse Source

Pull request #8225: REPORT-67986 显示结果调整,之前不显示改成不响应目录变化事件

Merge in DESIGN/design from ~XIQIU/design:feature/x to feature/x

* commit '7b5754b1790fd4650d43ed81e24310c16da406d7':
  REPORT-67986 显示结果调整
feature/x
Xiqiu 3 years ago
parent
commit
40be447e02
  1. 19
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java

19
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