return false;
}
}
- ResultConstructionPtr aResultConstruction =
- std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
- if (aResultConstruction.get()) {
- theError = "Error: Result construction not allowed for selection.";
- return false;
- }
std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
if (!aShape.get() && aContext.get()) {
GeomShapePtr aContextShape = aContext->shape();
if(aContext.get()) {
aDirShape = aContext->shape();
}
+
+ if (aDirShape.get() && aDirShape->isCompound()) {
+ GeomAPI_ShapeIterator anIt(aDirShape);
+ aDirShape = anIt.current();
+ }
}
}
}
std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
GeomShapePtr aContextShape;
- if (!aShape.get() && aContext.get()) {
+ if (aContext.get()) {
aContextShape = aContext->shape();
+ }
+ if (!aShape.get()) {
aShape = aContextShape;
}
if (!aShape.get()) {