From 927fca0eced9b002d50877fddec449fff07ae21e Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sat, 15 Aug 2015 12:15:46 +0200 Subject: [PATCH] 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. --- src/Mod/Sketcher/App/SketchObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 88b06a441..7bb0970ff 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -489,7 +489,7 @@ int SketchObject::addGeometry(const std::vector &geoList, bool std::vector< Part::Geometry * > newVals(vals); for (std::vector::const_iterator it = geoList.begin(); it != geoList.end(); ++it) { - if((*it)->getTypeId() != Part::GeomPoint::getClassTypeId()) + if(construction && (*it)->getTypeId() != Part::GeomPoint::getClassTypeId()) const_cast(*it)->Construction = construction; newVals.push_back(*it);