}
if (myIsCashed && !theTemporarily) {
- ResultPtr aResContext = std::dynamic_pointer_cast<ModelAPI_Result>(theContext);
- if (aResContext.get())
- myCash[aResContext].push_back(theSubShape);
+ myCash[theContext].push_back(theSubShape);
}
int aNewTag = mySize->Get() + 1;
if (!aShapes->get())
return true;
ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aContext->first);
- if (aRes.get() && (*aShapes)->isSame(aRes->shape()))
+ FeaturePtr aFeat = std::dynamic_pointer_cast<ModelAPI_Feature>(aContext->first);
+ if ((aRes.get() && (*aShapes)->isSame(aRes->shape())) || aFeat.get())
return true;
} else {
// we need to call here isSame instead of isEqual to do not check shapes orientation
for(int anIndex = size() - 1; anIndex >= 0; anIndex--) {
AttributeSelectionPtr anAttr = value(anIndex);
if (anAttr.get()) {
- myCash[anAttr->context()].push_back(anAttr->value());
+ myCash[anAttr->contextObject()].push_back(anAttr->value());
}
}
}