}
}
+ if (myIsCashed && !theTemporarily) {
+ myCash[theContext].push_back(theSubShape);
+ }
+
int aNewTag = mySize->Get() + 1;
TDF_Label aNewLab = mySize->Label().FindChild(aNewTag);
const std::shared_ptr<GeomAPI_Shape>& theSubShape,
const bool theTemporarily)
{
- if (!myCash.empty()) { // the cashing is active
+ if (myIsCashed) { // the cashing is active
std::map<ResultPtr, std::list<std::shared_ptr<GeomAPI_Shape> > >::iterator aContext =
myCash.find(theContext);
if (aContext != myCash.end()) {
} else { // recollect mySubs
theLabel.FindAttribute(TDataStd_Comment::GetID(), mySelectionType);
}
+ myIsCashed = false;
}
-void Model_AttributeSelectionList::cashValues(const bool theEnabled) {
+void Model_AttributeSelectionList::cashValues(const bool theEnabled)
+{
+ myIsCashed = theEnabled;
myCash.clear(); // empty list as indicator that cash is not used
if (theEnabled) {
for(int anIndex = size() - 1; anIndex >= 0; anIndex--) {