Browse Source

REPORT-5661 mac设计器打开最近的模板,提示模板不存在

master
MoMeak 7 years ago
parent
commit
bee3025601
  1. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  2. 2
      designer_base/src/com/fr/design/mainframe/JTemplate.java

2
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -918,7 +918,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (tplFile instanceof FileFILE) { if (tplFile instanceof FileFILE) {
fullName = tplFile.getPath(); fullName = tplFile.getPath();
} }
fullName = OperatingSystem.isMacOS() ? fullName.replaceAll("\\\\", "/") : fullName.replaceAll("/", "\\\\"); fullName = OperatingSystem.isWindows() ? fullName.replaceAll("/", "\\\\") : fullName.replaceAll("\\\\", "/");
int index = HistoryTemplateListPane.getInstance().contains(fullName); int index = HistoryTemplateListPane.getInstance().contains(fullName);
if (index != -1) { if (index != -1) {
this.activateJTemplate(HistoryTemplateListPane.getInstance().getHistoryList().get(index)); this.activateJTemplate(HistoryTemplateListPane.getInstance().getHistoryList().get(index));

2
designer_base/src/com/fr/design/mainframe/JTemplate.java

@ -197,7 +197,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
if (editingFileName.startsWith(ProjectConstants.REPORTLETS_NAME)) { if (editingFileName.startsWith(ProjectConstants.REPORTLETS_NAME)) {
editingFileName = ((FileNodeFILE) getEditingFILE()).getEnvPath() + File.separator + editingFileName; editingFileName = ((FileNodeFILE) getEditingFILE()).getEnvPath() + File.separator + editingFileName;
} }
if (!OperatingSystem.isMacOS()) { if (OperatingSystem.isWindows()) {
return editingFileName.replaceAll("/", "\\\\"); return editingFileName.replaceAll("/", "\\\\");
} else { } else {
return editingFileName.replaceAll("\\\\", "/"); return editingFileName.replaceAll("\\\\", "/");

Loading…
Cancel
Save