Commit 2a401ee8 authored by logari81's avatar logari81
Browse files

Sketcher: Fix deletion of coincident constraints on the root point

parent db901921
......@@ -410,7 +410,11 @@ int SketchObject::delConstraintOnPoint(int VertexId, bool onlyCoincident)
{
int GeoId;
PointPos PosId;
getGeoVertexIndex(VertexId, GeoId, PosId);
if (VertexId == -1) { // RootPoint
GeoId = -1;
PosId = start;
} else
getGeoVertexIndex(VertexId, GeoId, PosId);
return delConstraintOnPoint(GeoId, PosId, onlyCoincident);
}
......
......@@ -3349,6 +3349,8 @@ bool ViewProviderSketch::onDelete(const std::vector<std::string> &subList)
delGeometries.insert(GeoId);
else
delCoincidents.insert(VtId);
} else if (*it == "RootPoint") {
delCoincidents.insert(-1);
} else if (it->size() > 10 && it->substr(0,10) == "Constraint") {
int ConstrId = std::atoi(it->substr(10,4000).c_str());
delConstraints.insert(ConstrId);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment