]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for a regression: create a point(100, 100), start line creation, select the point...
authornds <nds@opencascade.com>
Wed, 16 Sep 2015 12:44:27 +0000 (15:44 +0300)
committernds <nds@opencascade.com>
Wed, 16 Sep 2015 12:44:58 +0000 (15:44 +0300)
src/PartSet/PartSet_WidgetPoint2d.cpp

index 60e826b4223c55649c23918418f4895e43d82b08..7e0b3cc059bc578bea7b3dfbced6d64b37d642fc 100644 (file)
@@ -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);