setCalculatedValue(theX, 0, 0);
} else if (x() != theX) {
myExpression[0]->setValue(theX);
+ myExpression[0]->setText(""); // uninitialize the text
owner()->data()->sendAttributeUpdated(this);
}
}
setCalculatedValue(0, theY, 0);
} else if (y() != theY) {
myExpression[1]->setValue(theY);
+ myExpression[1]->setText(""); // uninitialize the text
owner()->data()->sendAttributeUpdated(this);
}
}
}
else if (z() != theZ) {
myExpression[2]->setValue(theZ);
+ myExpression[2]->setText(""); // uninitialize the text
owner()->data()->sendAttributeUpdated(this);
}
}
}
}
}
+ if (aResSize > 0) { // check there exist a body that must be updated
+ std::list<ResultPtr>::const_iterator aRes = theFeature->results().cbegin();
+ for (; aResSize && aRes != theFeature->results().cend(); aRes++, aResSize++) {
+ if ((*aRes)->data()->isValid() && (*aRes)->groupName() == ModelAPI_ResultBody::group()) {
+ ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aRes);
+ aBody->updateSubs(aBody->shape());
+ }
+ }
+ }
}
ResultPtr Model_Objects::findByName(const std::string theName)
if (myLastConcealed != ModelAPI_ResultBody::isConcealed()) {
// check the whole tree of results: if one is concealed, everybody are concealed
ResultBodyPtr anOwner = std::dynamic_pointer_cast<ModelAPI_ResultBody>(data()->owner());
+ if (!anOwner.get())
+ return; // "this" is invalid
ResultBodyPtr aParent = ModelAPI_Tools::bodyOwner(anOwner);
while(aParent.get()) {
anOwner = aParent;
mySteps.pop_back();
}
while(mySteps.size() < aNbSteps) {
- mySteps.push_back(new Model_ResultField::Model_FieldStep(this, mySteps.size()));
+ mySteps.push_back(new Model_ResultField::Model_FieldStep(this, int(mySteps.size())));
}
}
}
/// \param theDisplay a boolean value
MODELAPI_EXPORT virtual void setDisplayed(const bool theDisplay);
+ /// Updates the sub-bodies if shape of this object is compsolid or compound
+ MODELAPI_EXPORT virtual void updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisShape) = 0;
+
protected:
/// Default constructor accessible only from Model_Objects
MODELAPI_EXPORT ModelAPI_ResultBody();
- /// Updates the sub-bodies if shape of this object is compsolid or compound
- virtual void updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisShape) = 0;
};
//! Pointer on feature object