From 047b1a2b44db871c4a76ced8bf1099fd99c27eaf Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 20 Mar 2020 14:55:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-28459=20JWorkBook=E6=9C=AA=E9=87=8A?= =?UTF-8?q?=E6=94=BE=20=E5=9C=BA=E6=99=AF=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/DesignerFrame.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 31798e665b..8d22f3f9f1 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/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); List> historyList = HistoryTemplateListCache.getInstance().getHistoryList(); if (index != -1) { - historyList.get(index).activeJTemplate(index, jt); + JTemplate currentTemplate = historyList.get(index); + // 双击激活已经打开的模板之前 需要释放一下 + currentTemplate.whenClose(); + currentTemplate.activeJTemplate(index, jt); } else { this.addAndActivateJTemplate(jt); }