Browse Source

REPORT-55243:改变报表引擎属性后,需要改变一下JTemplate的保存状态

research/11.0
fly.li 3 years ago
parent
commit
f4820d2769
  1. 13
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

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

@ -1615,9 +1615,8 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
worker.addSuccessCallback(new Runnable() {
@Override
public void run() {
//在新建报表流程会走这个流程,应该进行预编译
if (!JTemplate.this.isSaved() && !DesignModeContext.isVcsMode()){
//这里要先调下面这行代码
boolean isChangedFile = !JTemplate.this.isSaved() && !DesignModeContext.isVcsMode();
if (isChangedFile){
callBackForSave();
CptCompileUtil.compile(JTemplate.this);
}
@ -1626,11 +1625,11 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
if (ComparatorUtils.equals(JTemplate.this.template.getTemplateID(),
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().template.getTemplateID())) {
refreshToolArea();
}
DesignerFrameFileDealerPane.getInstance().refresh();
}
});
return worker;
}
@ -1682,7 +1681,11 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
if (!result) {
//在这里改变报表引擎属性
CptCompileUtil.changeFrEngineAttr(oldName, this);
boolean ischanged = CptCompileUtil.changeFrEngineAttr(oldName, this);
if (ischanged){
//如果改变了属性,则需要重新预编译,因此设置jTemplate的保存状态为false
this.saved = false;
}
result = this.saveRealFile();
// 更换最近打开
DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(oldName, this.getPath());

Loading…
Cancel
Save