From ec7573da429450e8ec667093fb196320ac35ae13 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 1 May 2014 18:04:33 +0200 Subject: [PATCH] Reorient sketch loses constraints (fix from chrisf) --- src/Mod/Sketcher/App/SketchObject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index fde29ce3f..062629442 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -1189,10 +1189,10 @@ int SketchObject::delConstraintsToExternal() { const std::vector< Constraint * > &constraints = Constraints.getValues(); std::vector< Constraint * > newConstraints(0); - int GeoId = -3; + int GeoId = -3, NullId = -2000; for (std::vector::const_iterator it = constraints.begin(); it != constraints.end(); ++it) { - if ((*it)->First > GeoId && (*it)->Second > GeoId) { + if ((*it)->First > GeoId && ((*it)->Second > GeoId || (*it)->Second == NullId) && ((*it)->Third > GeoId || (*it)->Third == NullId)) { newConstraints.push_back(*it); } }