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.
This commit is contained in:
Abdullah Tahiri
2017-12-06 16:44:03 +01:00
committed by wmayer
parent 0f021940b9
commit f0a4d6a524

View File

@@ -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;
}