diff --git a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java index 850539781d..850b737a36 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java @@ -81,7 +81,9 @@ public class SelectionModel { // 如果父层是scale和title两个专属容器,返回其父层,组件本身是不让被选中的 if (comp != designer.getRootComponent() && comp != designer.getParaComponent()) { XCreator parentContainer = (XCreator) comp.getParent(); - comp = parentContainer.isDedicateContainer() ? parentContainer : comp; + if (parentContainer != null) { + comp = parentContainer.isDedicateContainer() ? parentContainer : comp; + } } if (selection.removeSelectedCreator(comp) || selection.addSelectedCreator(comp)) { designer.getEditListenerTable().fireCreatorModified(comp, DesignerEvent.CREATOR_SELECTED); diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index dad299c2c9..851a2cdee6 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -1140,6 +1140,9 @@ public class FormDesigner extends TargetComponent