]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for dimensions crash
authordbv <dbv@opencascade.com>
Tue, 30 Aug 2016 07:54:21 +0000 (10:54 +0300)
committerdbv <dbv@opencascade.com>
Tue, 30 Aug 2016 07:54:37 +0000 (10:54 +0300)
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp

index 962ddfbc85f2cfb20de8b3ab9b3c9edea833bfc8..35104dc38fc72efff13967c0b5eac81c7d7b986c 100644 (file)
@@ -122,7 +122,11 @@ void SketchPlugin_ConstraintDistance::move(double theDeltaX, double theDeltaY)
   std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   myFlyoutUpdate = true;
-  aPoint->setValue(aPoint->x() + dX, aPoint->y() + dY);
+  if (aPoint->isInitialized()) {
+    aPoint->setValue(aPoint->x() + dX, aPoint->y() + dY);
+  } else {
+    aPoint->setValue(dX, dY);
+  }
   myFlyoutUpdate = false;
 }