PartDesign: remove Body::isFeature() because it's the same as BodyBase::hasFeature()
This commit is contained in:
parent
36fe5994b9
commit
f4a5bf6acd
|
@ -327,16 +327,6 @@ void Body::removeFeature(App::DocumentObject* feature)
|
|||
Model.setValues(model);
|
||||
}
|
||||
|
||||
bool Body::isFeature(App::DocumentObject* feature)
|
||||
{
|
||||
for(App::DocumentObject* obj : Model.getValues()) {
|
||||
|
||||
if(obj == feature)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
App::DocumentObjectExecReturn *Body::execute(void)
|
||||
{
|
||||
|
|
|
@ -85,10 +85,11 @@ App::DocumentObjectExecReturn *Boolean::execute(void)
|
|||
if (baseTopShape._Shape.IsNull())
|
||||
return new App::DocumentObjectExecReturn("Cannot do boolean operation with invalid base shape");
|
||||
|
||||
// TODO: move PartDesignGui::getBodyFor() from Gui to App and use it here
|
||||
//get the body this boolean feature belongs to
|
||||
PartDesign::Body* baseBody = NULL;
|
||||
for(PartDesign::Body* b : this->getDocument()->getObjectsOfType<PartDesign::Body>()) {
|
||||
if(b->isFeature(this)) {
|
||||
if(b->hasFeature(this)) {
|
||||
baseBody = b;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ PartDesign::Body *getBodyFor(App::DocumentObject* obj, bool messageIfNot)
|
|||
|
||||
//try to find the part the object is in
|
||||
for(PartDesign::Body* b : obj->getDocument()->getObjectsOfType<PartDesign::Body>()) {
|
||||
if(b->isFeature(obj)) {
|
||||
if(b->hasFeature(obj)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user