Browse Source

Pull request #1724: Persist/10.0

Merge in DESIGN/design from ~JEO/report-design:persist/10.0 to persist/10.0

* commit 'ace673fb074e75529c955d4380f5f9aed77c7241':
  REPORT-33018  fix 沿用之前的方案逻辑 防止产生假保存
  REPORT-32939 add comment
  REPORT-32939 设计器正常2g目前经常出现排队现象
persist/10.0
Kara 5 years ago
parent
commit
bbf278d859
  1. 1
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  2. 12
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

1
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -422,5 +422,4 @@ public class HistoryTemplateListCache implements CallbackEvent {
jt.refreshResource();
}
}
}

12
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1105,7 +1105,17 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
int index = HistoryTemplateListCache.getInstance().contains(tplFile);
if (index != -1) {
JTemplate jt = HistoryTemplateListCache.getInstance().getHistoryList().get(index);
if (!(jt instanceof JVirtualTemplate)) {
if (jt instanceof JVirtualTemplate) {
// 如果是JVirtualTemplate 创建真实JTemplate
JTemplate realJTemplate = JTemplateFactory.createJTemplate(tplFile);
if (realJTemplate == null) {
return;
}
// 由JVirtualTemplate激活真实JTemplate 本质在historyList中进行替换
// 同时 realJTemplate被管理起来 不需要主动释放 关闭时会自动释放
jt.activeJTemplate(index, realJTemplate);
return;
} else {
jt.activeOldJTemplate();
return;
}

Loading…
Cancel
Save