From: nds Date: Wed, 16 Sep 2015 12:44:27 +0000 (+0300) Subject: Fix for a regression: create a point(100, 100), start line creation, select the point... X-Git-Tag: V_1.4.0~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=177801ac0d4be9ae7b34224f9fb62e87b7cf9658;p=modules%2Fshaper.git 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) --- 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);