// take the face that more close by the indexes
ResultConstructionPtr aConstructionContext =
std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+ FeaturePtr aContextFeature = aContext->document()->feature(aContext);
// sketch sub-element
if (aConstructionContext &&
- std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContext).get())
+ std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature).get())
{
TDF_Label aLab = myRef.myRef->Label();
// getting a type of selected shape
bool aNoIndexes =
!aLab.FindAttribute(TDataStd_IntPackedMap::GetID(), aSubIds) || aSubIds->Extent() == 0;
// for now working only with composite features
- FeaturePtr aContextFeature = aContext->document()->feature(aContext);
CompositeFeaturePtr aComposite =
std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
- if (!aComposite || aComposite->numberOfSubs() == 0) {
+ if (!aComposite.get() || aComposite->numberOfSubs() == 0) {
return false;
}
{
FeaturePtr aF = std::dynamic_pointer_cast<ModelAPI_Feature>(*aFIter);
if (aF && aF->getKind() == "Extrusion") {
- if (aF->selection("extrusion_face")) {
- ResultPtr aSketchRes = aF->selection("extrusion_face")->context();
- if (aSketchRes) {
- static Events_ID HIDE_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TOHIDE);
- ModelAPI_EventCreator::get()->sendUpdated(aSketchRes, HIDE_DISP);
+ AttributeSelectionListPtr aBase = aF->selectionList("base");
+ if (aBase.get()) {
+ for(int a = aBase->size() - 1; a >= 0; a--) {
+ ResultPtr aSketchRes = aBase->value(a)->context();
+ if (aSketchRes) {
+ static Events_ID HIDE_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TOHIDE);
+ ModelAPI_EventCreator::get()->sendUpdated(aSketchRes, HIDE_DISP);
+ }
}
}
}