std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(anAttr);
aSelectAttr->setValue(myPresentedObject, GeomShapePtr(), true);
GeomShapePtr aShape = aSelectAttr->value();
+ if (!aShape.get() && aSelectAttr->contextFeature()->firstResult().get()) {
+ aShape = aSelectAttr->contextFeature()->firstResult()->shape();
+ }
if (aShape.get()) {
const TopoDS_Shape aTDShape = aShape->impl<TopoDS_Shape>();
Handle(AIS_InteractiveObject) anIO = myWorkshop->selection()->getIO(thePrs);
isOwnerSet = true;
}
}
+ else {
+ aSelAttr->setValue(aFeature, GeomShapePtr());
+ GeomShapePtr aShape = aSelAttr->value();
+ if (!aShape.get() && aSelAttr->contextFeature()->firstResult().get()) {
+ aShape = aSelAttr->contextFeature()->firstResult()->shape();
+ }
+ if (aShape.get()) {
+ const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
+ setSketchPlane(aTDShape);
+ isOwnerSet = true;
+ }
+ }
}
}
return isOwnerSet;