From 515175acffbe98e2f8ad46a56fe13f5fc26e70c0 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Mon, 21 Dec 2020 19:55:57 +0100 Subject: [PATCH] Sketcher: Allow UI to toggle construction status of Vertices --- src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp b/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp index 2074be1132..ac6b20832b 100644 --- a/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp +++ b/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp @@ -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();