Partially fix PartDesign move test
This commit is contained in:
@@ -271,12 +271,12 @@ std::vector<App::DocumentObject*> Body::addObject(App::DocumentObject *feature)
|
||||
throw Base::Exception("Body: object is not allowed");
|
||||
|
||||
//TODO: features should not add all links
|
||||
/*
|
||||
//only one group per object
|
||||
|
||||
//only one group per object. If it is in a body the single feature will be removed
|
||||
auto *group = App::GroupExtension::getGroupOfObject(feature);
|
||||
if(group && group != getExtendedObject())
|
||||
group->getExtensionByType<App::GroupExtension>()->removeObject(feature);
|
||||
*/
|
||||
group->getExtensionByType<GroupExtension>()->removeObject(feature);
|
||||
|
||||
|
||||
insertObject (feature, getNextSolidFeature (), /*after = */ false);
|
||||
// Move the Tip if we added a solid
|
||||
@@ -288,6 +288,15 @@ std::vector<App::DocumentObject*> Body::addObject(App::DocumentObject *feature)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector< App::DocumentObject* > Body::addObjects(std::vector< App::DocumentObject* > objs) {
|
||||
|
||||
for(auto obj : objs)
|
||||
addObject(obj);
|
||||
|
||||
return objs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Body::insertObject(App::DocumentObject* feature, App::DocumentObject* target, bool after)
|
||||
{
|
||||
|
||||
@@ -69,6 +69,7 @@ public:
|
||||
* The insertion poin is the before next solid after the Tip feature
|
||||
*/
|
||||
virtual std::vector<App::DocumentObject*> addObject(App::DocumentObject*) override;
|
||||
virtual std::vector< DocumentObject* > addObjects(std::vector< DocumentObject* > obj) override;
|
||||
|
||||
/**
|
||||
* Insert the feature into the body after the given feature.
|
||||
|
||||
Reference in New Issue
Block a user