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 {