]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
Salome HOME
Issue #144 Display flyout point for parellel constraint at point calculated by cascad...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintLength.cpp
index d0ca9f88b565348aefca50c352ae49866b790328..a1dce4b0c5a0c77122b8118272534d612fced9f4 100644 (file)
@@ -77,10 +77,10 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou
 
   boost::shared_ptr<GeomAPI_Pnt> aPoint1 = sketch()->to3D(aStartPoint->x(), aStartPoint->y());
   boost::shared_ptr<GeomAPI_Pnt> aPoint2 = sketch()->to3D(anEndPoint->x(), anEndPoint->y());
-  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt =
-      aFlyOutAttr->isInitialized() ?
-          sketch()->to3D(aFlyOutAttr->x(), aFlyOutAttr->y()) : boost::shared_ptr<GeomAPI_Pnt>();
-
+  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = boost::shared_ptr<GeomAPI_Pnt>();
+  if (aFlyOutAttr->isInitialized()) {
+    aFlyoutPnt = sketch()->to3D(aFlyOutAttr->x(), aFlyOutAttr->y());
+  }
   // value calculation
   boost::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = boost::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));