Browse Source

REPORT-28459 JWorkBook未释放 场景补充

feature/big-screen
hades 5 years ago
parent
commit
047b1a2b44
  1. 5
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

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

@ -1126,7 +1126,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
int index = HistoryTemplateListCache.getInstance().contains(jt); int index = HistoryTemplateListCache.getInstance().contains(jt);
List<JTemplate<?, ?>> historyList = HistoryTemplateListCache.getInstance().getHistoryList(); List<JTemplate<?, ?>> historyList = HistoryTemplateListCache.getInstance().getHistoryList();
if (index != -1) { if (index != -1) {
historyList.get(index).activeJTemplate(index, jt); JTemplate currentTemplate = historyList.get(index);
// 双击激活已经打开的模板之前 需要释放一下
currentTemplate.whenClose();
currentTemplate.activeJTemplate(index, jt);
} else { } else {
this.addAndActivateJTemplate(jt); this.addAndActivateJTemplate(jt);
} }

Loading…
Cancel
Save