Sketcher: Bug fix addGeometry list creation and construction lines

==================================================================

A recent improvement was to allow to create an object (several geometric elements) as construction lines
by providing an additional parameter as true (that defaults to false).

This introduced a bug, that when a list of geometries mixing construction and normal lines was added (with the parameter as false),
construction lines would be converted to normal lines.

This fixes the bug.
This commit is contained in:
Abdullah Tahiri 2015-08-15 12:15:46 +02:00 committed by wmayer
parent 9583ce4c70
commit 927fca0ece

View File

@ -489,7 +489,7 @@ int SketchObject::addGeometry(const std::vector<Part::Geometry *> &geoList, bool
std::vector< Part::Geometry * > newVals(vals);
for (std::vector<Part::Geometry *>::const_iterator it = geoList.begin(); it != geoList.end(); ++it) {
if((*it)->getTypeId() != Part::GeomPoint::getClassTypeId())
if(construction && (*it)->getTypeId() != Part::GeomPoint::getClassTypeId())
const_cast<Part::Geometry *>(*it)->Construction = construction;
newVals.push_back(*it);