From 5e91a695f3831c2f0aac6932fab0465da3137fee Mon Sep 17 00:00:00 2001 From: "fly.li" Date: Tue, 29 Mar 2022 10:07:09 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-10650:=E4=BF=AE=E6=94=B9=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E5=8E=9F=E6=9C=89frm=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE=EF=BC=8C=E4=BB=8EFormParallelAction?= =?UTF-8?q?=E4=B8=AD=E6=94=BE=E5=88=B0FormParallelSettingPane=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/FormParallelAction.java | 4 ---- .../ui/designer/FormParallelSettingPane.java | 16 ++++++---------- 2 files changed, 6 insertions(+), 14 deletions(-) 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