diff --git a/src/Mod/Sketcher/App/PythonConverter.cpp b/src/Mod/Sketcher/App/PythonConverter.cpp index f10fc1b410..60dbdbc3fe 100644 --- a/src/Mod/Sketcher/App/PythonConverter.cpp +++ b/src/Mod/Sketcher/App/PythonConverter.cpp @@ -675,9 +675,9 @@ std::string PythonConverter::process(const Sketcher::Constraint* constraint, Geo if (!constraint->isActive || !constraint->isDriving) { std::string active = constraint->isActive ? "True" : "False"; - std::string driving = constraint->isDriving ? "True" : "False"; resultStr += ", " + active; if (constraint->isDimensional()) { + std::string driving = constraint->isDriving ? "True" : "False"; resultStr += ", " + driving; } } diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 2239d3df22..177a73aa5e 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -1549,12 +1549,7 @@ int SketchObject::addGeometry(const std::vector& geoList, Part::Geometry* copy = v->copy(); generateId(copy); - if (copy->is()) { - // creation mode for points is always construction not to - // break legacy code - GeometryFacade::setConstruction(copy, true); - } - else if (construction) { + if (construction) { GeometryFacade::setConstruction(copy, construction); } @@ -1588,12 +1583,7 @@ int SketchObject::addGeometry(std::unique_ptr newgeo, bool const auto* geoNew = newgeo.release(); generateId(geoNew); - if (geoNew->is()) { - // creation mode for points is always construction not to - // break legacy code - GeometryFacade::setConstruction(geoNew, true); - } - else if (construction) { + if (construction) { GeometryFacade::setConstruction(geoNew, construction); } diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h index 851c9ed6fa..617b740d4b 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h @@ -85,7 +85,7 @@ private: editPoint.x, editPoint.y); - if (!isConstructionMode()) { + if (isConstructionMode()) { Gui::cmdAppObjectArgs(sketchgui->getObject(), "toggleConstruction(%d)", getHighestCurveIndex());