PartDesign Body migration: Fix migration of MultiTransform sub-features

This commit is contained in:
jrheinlaender
2013-07-26 15:56:56 +02:00
committed by Stefan Tröger
parent b2dd70e635
commit 36a00f45b6
2 changed files with 23 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
#include <Gui/Application.h>
#include <Mod/PartDesign/App/Body.h>
#include <Mod/PartDesign/App/FeatureSketchBased.h>
#include <Mod/PartDesign/App/FeatureMultiTransform.h>
#include <Mod/PartDesign/App/DatumLine.h>
#include <Mod/PartDesign/App/DatumPlane.h>
#include <algorithm>
@@ -120,6 +121,14 @@ std::vector<App::DocumentObject*> ViewProviderBody::claimChildren(void)const
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);
}
}
// remove the otherwise handled objects, preserving their order so the order in the TreeWidget is correct