From 295a219bd6eacd18149e92a5a7f59363a02a43e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 12 Oct 2021 10:42:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60392=20=E3=80=90=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=B8=83=E5=B1=80-=E5=8E=9F=E5=B8=83=E5=B1=80=E6=8E=A8?= =?UTF-8?q?=E8=8D=904.1=E3=80=91=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8-?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83=E5=B1=80-=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E7=A9=BA=E7=99=BD=E6=A8=A1=E6=9D=BF/=E5=B8=A6?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9B=AE=E5=BD=95=E6=A0=91=E5=A4=84=EF=BC=8C?= =?UTF-8?q?body=E5=90=8D=E5=AD=97=E5=8F=98=E7=A9=BA=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/FormDesigner.java | 10 +--------- .../com/fr/design/widget/ui/designer/NewFormPane.java | 4 +++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index 25bd5749f9..5d651aa021 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -1010,15 +1010,7 @@ public class FormDesigner extends TargetComponent
implements TreeSelection } private void refreshCenter(Widget centerWidget, XLayoutContainer formLayoutContainer) { - // 不存在center块, 说明是新建的模板 - if (centerWidget == null) { - XLayoutContainer layoutContainer = (XLayoutContainer) XCreatorUtils.createXCreator(new WFitLayout("body")); - layoutContainer.setSize(LARGE_PREFERRED_SIZE); - setRootComponent(layoutContainer); - formLayoutContainer.add(rootComponent, WBorderLayout.CENTER); - return; - } - + // 不存在center块, 说明是新建的模板(fanglei:大人,时代变了) XLayoutContainer centerContainer = (XLayoutContainer) XCreatorUtils.createXCreator(centerWidget); Dimension d = new Dimension(); d.width = ((WFitLayout) centerWidget).getContainerWidth(); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java index 8ca985ef3a..dfa156d5e1 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java @@ -294,7 +294,9 @@ public class NewFormPane extends BasicPane { } private Form initEmptyBodyForm() { - WFitLayout body = new WFitLayout(); + WFitLayout body = new WFitLayout("body"); + body.setContainerWidth(WBorderLayout.DEFAULT_WIDTH); + body.setContainerHeight(WBorderLayout.DEFAULT_HEIGHT); WBorderLayout borderLayout = new WBorderLayout("form"); borderLayout.addCenter(body); return new Form(borderLayout);