Drags and drop with groups

This commit is contained in:
plgarcia
2018-05-15 08:16:05 +02:00
committed by wmayer
parent 47ae980fa2
commit 77232b2141
10 changed files with 82 additions and 2 deletions

View File

@@ -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);
}