From abeb61ff79a006926f23ed365f74a5aedb056ec1 Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 9 Oct 2021 11:40:30 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60509=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=E6=8B=96=E6=8B=BD=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=B0=E7=A9=BA=E7=99=BD=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E5=B7=B2=E6=8B=96=E5=85=A5=E7=9A=84=E7=BB=84=E4=BB=B6=E4=BC=9A?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8F=98=E5=8C=96=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/XWFitLayout.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java index 5b9a133347..71aa6f9908 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java @@ -796,8 +796,6 @@ public class XWFitLayout extends XLayoutContainer { layout.setContainerHeight(containerHeight); layout.setContainerWidth(containerWidth); addCompInterval(getAcualInterval()); - LayoutUtils.layoutContainer(this); - // REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置 // 绝对布局内的组件尺寸调整需要在绝对布局的bound排除GAP后进行,否则计算出的 // 组件尺寸缩放比例会有问题 @@ -888,7 +886,11 @@ public class XWFitLayout extends XLayoutContainer { isRefreshing = true; this.remove(oldCreator); this.add(newCreator); - this.updateBoundsWidget(); + //对于新增的绝对布局的组件,需要更新下内部组件的大小 + if (newCreator.acceptType(XWAbsoluteLayout.class)){ + ((XWAbsoluteLayout) newCreator).updateBoundsWidget(); + newCreator.setBackupBound(newCreator.getBounds()); + } isRefreshing = false; LayoutUtils.layoutContainer(this); }