diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 2d208284c..78a76007b 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -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); } diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 2beb574b2..8e625ab76 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -3349,6 +3349,8 @@ bool ViewProviderSketch::onDelete(const std::vector &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);