Sketcher: std::move improvement fixes

This commit is contained in:
Abdullah Tahiri
2021-01-07 12:02:17 +01:00
parent a78a8c9d37
commit 81735a92e8

View File

@@ -1162,8 +1162,7 @@ int SketchObject::setConstruction(int GeoId, bool on)
// in the accumulative of actions it is judged that it is worth to trigger an update here.
std::unique_ptr<Part::Geometry> geo(vals[GeoId]->clone());
auto gft = GeometryFacade::getFacade(geo.get());
gft->setConstruction(!gft->getConstruction());
GeometryFacade::setConstruction(geo.get(), on);
this->Geometry.set1Value(GeoId, std::move(geo));
solverNeedsUpdate=true;
@@ -5693,6 +5692,9 @@ int SketchObject::carbonCopy(App::DocumentObject * pObj, bool construction)
const std::vector< Sketcher::Constraint * > &scvals = psObj->Constraints.getValues();
newVals.reserve(vals.size()+svals.size());
newcVals.reserve(cvals.size()+scvals.size());
if(psObj->ExternalGeometry.getSize()>0) {
std::vector<DocumentObject*> Objects = ExternalGeometry.getValues();
std::vector<std::string> SubElements = ExternalGeometry.getSubValues();