Sketcher: addGeometry : Remove point construction limitation.
This commit is contained in:
committed by
Yorik van Havre
parent
f763fe5bf3
commit
e7ff71c20c
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1549,12 +1549,7 @@ int SketchObject::addGeometry(const std::vector<Part::Geometry*>& geoList,
|
||||
Part::Geometry* copy = v->copy();
|
||||
generateId(copy);
|
||||
|
||||
if (copy->is<Part::GeomPoint>()) {
|
||||
// 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<Part::Geometry> newgeo, bool const
|
||||
auto* geoNew = newgeo.release();
|
||||
generateId(geoNew);
|
||||
|
||||
if (geoNew->is<Part::GeomPoint>()) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ private:
|
||||
editPoint.x,
|
||||
editPoint.y);
|
||||
|
||||
if (!isConstructionMode()) {
|
||||
if (isConstructionMode()) {
|
||||
Gui::cmdAppObjectArgs(sketchgui->getObject(),
|
||||
"toggleConstruction(%d)",
|
||||
getHighestCurveIndex());
|
||||
|
||||
Reference in New Issue
Block a user