diff --git a/designer-form/src/main/java/com/fr/design/actions/FormParallelAction.java b/designer-form/src/main/java/com/fr/design/actions/FormParallelAction.java index 25a15ae415..914823af9c 100644 --- a/designer-form/src/main/java/com/fr/design/actions/FormParallelAction.java +++ b/designer-form/src/main/java/com/fr/design/actions/FormParallelAction.java @@ -64,10 +64,6 @@ public class FormParallelAction extends JTemplateAction { FormParallelSettingPane attrPane = new FormParallelSettingPane(); Form form = jf.getTarget(); FormParallelAttr parallelAttr = form.getParallelAttr(); - //兼容之前的frm文件,在获取不到属性时 - if (parallelAttr == null){ - parallelAttr = FormParallelAttr.getDefaultParallelAttr(); - } attrPane.populateBean(parallelAttr); UIDialog dialog = attrPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/FormParallelSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/FormParallelSettingPane.java index 2533e71454..b7ad9cff54 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/FormParallelSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/FormParallelSettingPane.java @@ -39,22 +39,18 @@ public class FormParallelSettingPane extends BasicBeanPane { private void initPane(){ JPanel calSettingPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Designer_Form_Block_Parallel_Setting")); - calSettingPane.add(getCalculateSettingPane()); + this.parallelCalculatePane = new ParallelSettingPane(); + calSettingPane.add(parallelCalculatePane); calSettingPane.setPreferredSize(new Dimension(550,110)); this.add(calSettingPane); } - private ParallelSettingPane getCalculateSettingPane(){ - if (parallelCalculatePane == null){ - this.parallelCalculatePane = new ParallelSettingPane(); - } - return parallelCalculatePane; - } - - @Override public void populateBean(FormParallelAttr ob) { - getCalculateSettingPane().populateBean(ob.getParallelCalculateMark()); + if (ob == null){ + ob = FormParallelAttr.getDefaultParallelAttr(); + } + parallelCalculatePane.populateBean(ob.getParallelCalculateMark()); } @Override