Browse Source

Pull request #1715: REPORT-33018 设计器正常2g目前经常出现排队现象

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '4b73db2bf361d53ad388511a26c512790afe6fc4':
  REPORT-33018  fix 沿用之前的方案逻辑 防止产生假保存
  REPORT-32939 add comment
  REPORT-32939 设计器正常2g目前经常出现排队现象
feature/big-screen
Hades 5 years ago
parent
commit
06d9a68955
  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