From c147fec30298c1c7bc0673af4bdfcdc5b16bb812 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Tue, 22 Sep 2020 09:22:10 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-40025=20=E4=BF=AE=E6=94=B9=E5=9C=A8?= =?UTF-8?q?=E5=B7=B2=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E4=B8=AD=E6=8C=89?= =?UTF-8?q?=E5=9D=90=E6=A0=87=E8=8E=B7=E5=8F=96=E7=BB=84=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XCreatorUtils.java | 7 +-- .../com/fr/design/mainframe/FormDesigner.java | 57 +++++++++++++++---- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index 0c4ea6313f..260318023e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -345,17 +345,16 @@ public class XCreatorUtils { } /** - * 获取组件的最顶层XMainBorderLayout,没有则返回null + * 获取组件的上一层的XMainBorderLayout,没有则返回null * */ @Nullable public static XWCardMainBorderLayout getTopXMainBorderLayout(Container creator) { - XWCardMainBorderLayout result = null; while (creator != null) { if (creator instanceof XWCardMainBorderLayout) { - result = (XWCardMainBorderLayout) creator; + return (XWCardMainBorderLayout) creator; } creator = creator.getParent(); } - return result; + return null; } } \ No newline at end of file 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 55c2106b01..ef7760cdb6 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 @@ -842,26 +842,59 @@ public class FormDesigner extends TargetComponent