From 177801ac0d4be9ae7b34224f9fb62e87b7cf9658 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 16 Sep 2015 15:44:27 +0300 Subject: [PATCH] Fix for a regression: create a point(100, 100), start line creation, select the point as the line start point. The coordinates should be: (100, 100) --- src/PartSet/PartSet_WidgetPoint2d.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 60e826b42..7e0b3cc05 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -339,6 +339,8 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous setPoint(aX, aY); } else { + if (getPoint2d(aView, aShape, aX, aY)) + setPoint(aX, aY); setConstraintWith(aObject); emit vertexSelected(); emit focusOutWidget(this); @@ -357,8 +359,10 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous // do not set a coincidence constraint in the attribute if the feature contains a point // with the same coordinates. It is important for line creation in order to do not set // the same constraints for the same points, oterwise the result line has zero length. - if (getPoint2d(aView, aShape, aX, aY)) + if (getPoint2d(aView, aShape, aX, aY)) { + setPoint(aX, aY); PartSet_Tools::setConstraints(mySketch, feature(), attributeID(), aX, aY); + } else if (aShape.ShapeType() == TopAbs_EDGE) { if (MyFeaturesForCoincedence.contains(myFeature->getKind().c_str())) setConstraintWith(aObject); -- 2.39.2