Sketcher: Fix deletion of coincident constraints on the root point

This commit is contained in:
logari81 2012-12-08 23:48:35 +01:00
parent db901921db
commit 2a401ee895
2 changed files with 7 additions and 1 deletions

View File

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

View File

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