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); } }