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..c4fa2df8a1 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,61 @@ public class FormDesigner extends TargetComponent