From 5aa637b87fb210038e02790ef76c5866bac459c1 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 14 Dec 2021 16:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-form/src/main/java/com/fr/design/fit/NewJForm.java | 2 ++ .../src/main/java/com/fr/design/fit/toolbar/SwitchAction.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java index 034834f411..9df0806de3 100644 --- a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java +++ b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java @@ -52,6 +52,8 @@ public class NewJForm extends JForm { public NewJForm(Form form) { super(form); init(); + //新建的模板都要加上新表单标志attr + form.addAttrMark(NewFormMarkAttr.createNewFormAttr()); } public NewJForm(Form form, FILE file, Parameter[] parameters) { diff --git a/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java b/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java index 5e45e97ace..bf490a7200 100644 --- a/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java +++ b/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java @@ -171,7 +171,7 @@ public class SwitchAction extends UpdateAction { */ private boolean backUpOldModeJTemplate() { JTemplate jTemplate = TemplateTool.getCurrentEditingTemplate(); - if (jTemplate != null && !(jTemplate instanceof NewJForm)) { + if (jTemplate != null && !TemplateTool.isNewJForm(jTemplate)) { FILE editingFILE = jTemplate.getEditingFILE(); if (editingFILE != null && editingFILE.exists()) { try {