Browse Source

Merge branch 'final/10.0' into persist/10.0

persist/10.0
jeo 5 years ago
parent
commit
ace673fb07
  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