PDN: Make Loft and Pipe claim children correctly
This commit is contained in:
@@ -56,10 +56,18 @@ ViewProviderLoft::~ViewProviderLoft()
|
||||
std::vector<App::DocumentObject*> ViewProviderLoft::claimChildren(void)const
|
||||
{
|
||||
std::vector<App::DocumentObject*> temp;
|
||||
App::DocumentObject* sketch = static_cast<PartDesign::Loft*>(getObject())->getVerifiedSketch(true);
|
||||
|
||||
PartDesign::Loft* pcLoft = static_cast<PartDesign::Loft*>(getObject());
|
||||
|
||||
App::DocumentObject* sketch = pcLoft->getVerifiedSketch(true);
|
||||
if (sketch != NULL)
|
||||
temp.push_back(sketch);
|
||||
|
||||
for(App::DocumentObject* obj : pcLoft->Sections.getValues()) {
|
||||
if (obj != NULL)
|
||||
temp.push_back(obj);
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,10 +56,21 @@ ViewProviderPipe::~ViewProviderPipe()
|
||||
std::vector<App::DocumentObject*> ViewProviderPipe::claimChildren(void)const
|
||||
{
|
||||
std::vector<App::DocumentObject*> temp;
|
||||
App::DocumentObject* sketch = static_cast<PartDesign::Pipe*>(getObject())->getVerifiedSketch(true);
|
||||
|
||||
PartDesign::Pipe* pcPipe = static_cast<PartDesign::Pipe*>(getObject());
|
||||
|
||||
App::DocumentObject* sketch = pcPipe->getVerifiedSketch(true);
|
||||
if (sketch != NULL)
|
||||
temp.push_back(sketch);
|
||||
|
||||
App::DocumentObject* spine = pcPipe->Spine.getValue();
|
||||
if (spine != NULL)
|
||||
temp.push_back(spine);
|
||||
|
||||
App::DocumentObject* auxspine = pcPipe->AuxillerySpine.getValue();
|
||||
if (auxspine != NULL)
|
||||
temp.push_back(auxspine);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user