From f0a4d6a52409d39bbddb5f573dd247d18e5b2007 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Wed, 6 Dec 2017 16:44:03 +0100 Subject: [PATCH] Sketcher: Fix Polygon disappearing on creation with autoconstraints on ====================================================================== Fixes #3154 About the fix: - If a non-zero vector is passed to seekAutoConstraint, it will suggest a vertical/horizontal constraint, which does not make sense in the construction method. - Passing a zero vector enables to treat it like a point, so for example point on object will be suggested, but not vertical/horizontal constraints. --- src/Mod/Sketcher/Gui/CommandCreateGeo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index cdcc65cf01..e5ed36b9dd 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -7182,7 +7182,7 @@ public: setPositionText(onSketchPos, text); sketchgui->drawEdit(EditCurve); - if (seekAutoConstraint(sugConstr2, onSketchPos, dV)) { + if (seekAutoConstraint(sugConstr2, onSketchPos, Base::Vector2d(0.f,0.f))) { renderSuggestConstraintsCursor(sugConstr2); return; }