Browse Source

代码修改

feature/x
kerry 3 years ago
parent
commit
5aa637b87f
  1. 2
      designer-form/src/main/java/com/fr/design/fit/NewJForm.java
  2. 2
      designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java

2
designer-form/src/main/java/com/fr/design/fit/NewJForm.java

@ -52,6 +52,8 @@ public class NewJForm extends JForm {
public NewJForm(Form form) { public NewJForm(Form form) {
super(form); super(form);
init(); init();
//新建的模板都要加上新表单标志attr
form.addAttrMark(NewFormMarkAttr.createNewFormAttr());
} }
public NewJForm(Form form, FILE file, Parameter[] parameters) { public NewJForm(Form form, FILE file, Parameter[] parameters) {

2
designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java

@ -171,7 +171,7 @@ public class SwitchAction extends UpdateAction {
*/ */
private boolean backUpOldModeJTemplate() { private boolean backUpOldModeJTemplate() {
JTemplate<?, ?> jTemplate = TemplateTool.getCurrentEditingTemplate(); JTemplate<?, ?> jTemplate = TemplateTool.getCurrentEditingTemplate();
if (jTemplate != null && !(jTemplate instanceof NewJForm)) { if (jTemplate != null && !TemplateTool.isNewJForm(jTemplate)) {
FILE editingFILE = jTemplate.getEditingFILE(); FILE editingFILE = jTemplate.getEditingFILE();
if (editingFILE != null && editingFILE.exists()) { if (editingFILE != null && editingFILE.exists()) {
try { try {

Loading…
Cancel
Save