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
|
||||
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
|
||||
if ((*it)->isDerivedFrom(PartDesign::SketchBased::getClassTypeId())){
|
||||
App::DocumentObject* sketch = static_cast<PartDesign::SketchBased*>(*it)->Sketch.getValue();
|
||||
if (sketch != NULL)
|
||||
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);
|
||||
}
|
||||
std::vector<App::DocumentObject*> children = Gui::Application::Instance->getViewProvider(*it)->claimChildren();
|
||||
for (std::vector<App::DocumentObject*>::const_iterator ch = children.begin(); ch != children.end(); ch++)
|
||||
if ((*ch) != NULL)
|
||||
OutSet.insert(*ch);
|
||||
}
|
||||
|
||||
// remove the otherwise handled objects, preserving their order so the order in the TreeWidget is correct
|
||||
|
|
Loading…
Reference in New Issue
Block a user