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 490b4e7e99..b826931b61 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 @@ -977,6 +977,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * @param jt 添加的模板. */ public void addAndActivateJTemplate(JTemplate jt) { + JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (currentEditingTemplate != null) { + currentEditingTemplate.stopEditing(); + } //切换文件后清空FixedPopupPane面板 EastRegionContainerPane.getInstance().clearCurrentPopupPane(); //释放模板对象 diff --git a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java index 809a246e1e..a387e0f3a9 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java @@ -176,6 +176,7 @@ public class ECBlockEditor extends BlockEditor { // 超级链接 HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate() .getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); + EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane); hyperlinkGroupPane.populate(editComponent); } @@ -187,4 +188,4 @@ public class ECBlockEditor extends BlockEditor { ElementCasePane ePane = (ElementCasePane)jTemplate.getCurrentElementCasePane(); return ePane != null && ePane.isSelectedOneCell(); } -} \ No newline at end of file +}