Drags and drop with groups

This commit is contained in:
plgarcia
2018-11-29 21:25:28 +01:00
committed by wmayer
parent 82fd0a8db6
commit 792bb8282a
10 changed files with 82 additions and 2 deletions
@@ -154,3 +154,11 @@ void ViewProviderCompound::dropObject(App::DocumentObject* obj)
pShapes.push_back(obj);
pComp->Links.setValues(pShapes);
}
void ViewProviderCompound::replaceObject(App::DocumentObject* oldValue, App::DocumentObject* newValue)
{
Part::Compound* pBool = static_cast<Part::Compound*>(getObject());
std::vector<App::DocumentObject*> pShapes = pBool->Links.getValues();
std::replace(pShapes.begin(), pShapes.end(), oldValue, newValue);
pBool->Links.setValues(pShapes);
}