Sketcher: Allow UI to toggle construction status of Vertices

This commit is contained in:
Abdullah Tahiri
2020-12-21 19:55:57 +01:00
committed by abdullahtahiriyo
parent e9e6be66c3
commit 515175acff

View File

@@ -144,6 +144,21 @@ void CmdSketcherToggleConstruction::activated(int iMsg)
// issue the actual commands to toggle
Gui::cmdAppObjectArgs(selection[0].getObject(), "toggleConstruction(%d) ", GeoId);
}
if (it->size() > 6 && it->substr(0,6) == "Vertex") {
int vertexId = std::atoi(it->substr(6,4000).c_str()) - 1;
int geoId;
PointPos pos;
Obj->getGeoVertexIndex(vertexId,geoId, pos);
auto geo = Obj->getGeometry(geoId);
if(geo && geo->getTypeId() == Part::GeomPoint::getClassTypeId()) {
// issue the actual commands to toggle
Gui::cmdAppObjectArgs(selection[0].getObject(), "toggleConstruction(%d) ", geoId);
}
}
}
// finish the transaction and update
commitCommand();