ViewProviderBody::claimChildren() : Claim all children not claimed by another object
This commit is contained in:
parent
02ce7395aa
commit
a4ad9a6a55
|
@ -115,20 +115,10 @@ std::vector<App::DocumentObject*> ViewProviderBody::claimChildren(void)const
|
||||||
|
|
||||||
// search for objects handled (claimed) by the features
|
// search for objects handled (claimed) by the features
|
||||||
for(std::vector<App::DocumentObject*>::const_iterator it = Model.begin();it!=Model.end();++it){
|
for(std::vector<App::DocumentObject*>::const_iterator it = Model.begin();it!=Model.end();++it){
|
||||||
// sketches of SketchBased features get claimed under the feature so has to be removed from the Body
|
std::vector<App::DocumentObject*> children = Gui::Application::Instance->getViewProvider(*it)->claimChildren();
|
||||||
if ((*it)->isDerivedFrom(PartDesign::SketchBased::getClassTypeId())){
|
for (std::vector<App::DocumentObject*>::const_iterator ch = children.begin(); ch != children.end(); ch++)
|
||||||
App::DocumentObject* sketch = static_cast<PartDesign::SketchBased*>(*it)->Sketch.getValue();
|
if ((*ch) != NULL)
|
||||||
if (sketch != NULL)
|
OutSet.insert(*ch);
|
||||||
OutSet.insert(sketch);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transformations of a MultiTransform feature get claimed under the feature, too
|
|
||||||
if ((*it)->isDerivedFrom(PartDesign::MultiTransform::getClassTypeId())) {
|
|
||||||
std::vector<App::DocumentObject*> trfs = static_cast<PartDesign::MultiTransform*>(*it)->Transformations.getValues();
|
|
||||||
for (std::vector<App::DocumentObject*>::const_iterator t = trfs.begin(); t != trfs.end(); t++)
|
|
||||||
if ((*t) != NULL)
|
|
||||||
OutSet.insert(*t);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove the otherwise handled objects, preserving their order so the order in the TreeWidget is correct
|
// remove the otherwise handled objects, preserving their order so the order in the TreeWidget is correct
|
||||||
|
|
Loading…
Reference in New Issue
Block a user