Browse Source

REPORT-87768 判断逻辑前置

release/11.0
Carlson 2 years ago
parent
commit
e1b4a4f850
  1. 15
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

15
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -326,15 +326,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public abstract JComponent getCurrentReportComponentPane();
/**
* 为另存的模板创建新的模板id
*/
private void generateNewTemplateIdForSaveAs() {
if (StringUtils.isEmpty(template.getTemplateID()) || this.getEditingFILE().exists()) {
generateTemplateId();
}
}
/**
* 收集图表信息
*/
@ -959,7 +950,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
originID = currentId;
}
// 在保存之前,初始化 templateID
generateNewTemplateIdForSaveAs();
if (StringUtils.isEmpty(currentId)) {
generateTemplateId();
}
this.editingFILE = editingFILE;
boolean result = this.saveToNewFile(oldName);
@ -1834,7 +1827,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
originID = currentId;
}
// 在保存之前,初始化 templateID
generateNewTemplateIdForSaveAs();
generateTemplateId();
this.editingFILE = editingFILE;
boolean result = this.saveToNewRealFile(oldName);
if (result) {

Loading…
Cancel
Save