From 9d434f6b36d2cb452d10a1187ea5fae7764397c7 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 5 Aug 2020 15:38:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-36386=20=E8=87=AA=E9=80=82=E5=BA=94?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=87=BA=E7=8E=B0=E4=B8=8D=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E6=83=85=E5=86=B5?= 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, 7 insertions(+), 1 deletion(-) 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 2376ecc94..3b671c217 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 @@ -19,6 +19,7 @@ import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WLayout; import com.fr.form.ui.widget.CRBoundsWidget; +import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.FRScreen; import com.fr.stable.ArrayUtils; @@ -1125,7 +1126,12 @@ public class XWFitLayout extends XLayoutContainer { public Component getBottomComp(int x, int y, int h) { int val = getAcualInterval(); - return this.getComponentAt(x, y+h+default_Length+val); + Component comp = this.getComponentAt(x, y+h+default_Length+val); + if (ComparatorUtils.equals(this, comp)) { + // 如果获取组件等于自身 说明存在偏移 加上一个默认偏移量 + return this.getComponentAt(x + default_Length, y+h+default_Length+val); + } + return comp; } public Component getRightTopComp(int x, int y, int w) {