diff --git a/designer_form/src/com/fr/design/mainframe/ComponentTree.java b/designer_form/src/com/fr/design/mainframe/ComponentTree.java index a3452f602f..d439629d59 100644 --- a/designer_form/src/com/fr/design/mainframe/ComponentTree.java +++ b/designer_form/src/com/fr/design/mainframe/ComponentTree.java @@ -241,12 +241,14 @@ public class ComponentTree extends JTree { creator.notShowInComponentTree(path); } //绝对布局作为body的时候不显示自适应布局父层 - if (((XCreator) parent).acceptType(XWAbsoluteBodyLayout.class) - && (parent.getParent() != null) - && ((XCreator)parent.getParent()).acceptType(XWFitLayout.class)){ - parent = parent.getParent().getParent(); - continue; + if (((XCreator) parent).acceptType(XWAbsoluteBodyLayout.class)) { + if ((parent.getParent() != null) + && ((XCreator)parent.getParent()).acceptType(XWFitLayout.class)){ + parent = parent.getParent().getParent(); + continue; + } } + parent = parent.getParent(); } Object[] components = path.toArray();