make sure to avoid duplicate child elements in view provider of ruled surface

This commit is contained in:
wmayer
2017-09-08 14:52:12 +02:00
parent 5a32fd5886
commit f27617e63e

View File

@@ -55,10 +55,14 @@ ViewProviderRuledSurface::~ViewProviderRuledSurface()
std::vector<App::DocumentObject*> ViewProviderRuledSurface::claimChildren() const
{
std::vector<App::DocumentObject*> temp;
temp.push_back(static_cast<Part::RuledSurface*>(getObject())->Curve1.getValue());
temp.push_back(static_cast<Part::RuledSurface*>(getObject())->Curve2.getValue());
return temp;
// in a set each element is unique
std::set<App::DocumentObject*> temp;
temp.insert(static_cast<Part::RuledSurface*>(getObject())->Curve1.getValue());
temp.insert(static_cast<Part::RuledSurface*>(getObject())->Curve2.getValue());
std::vector<App::DocumentObject*> array;
array.insert(array.begin(), temp.begin(), temp.end());
return array;
}
void ViewProviderRuledSurface::updateData(const App::Property* prop)