Salome HOME
Fixes for crashes and bad behavior on delete of features and Parts. For now delete...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintDistance.cpp
index 583477a02282651e26ee1afec8051a0729a2a988..ea131563fb568aaca69d614218be7e475c4d7acb 100644 (file)
@@ -138,10 +138,8 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = thePrevious;
-  if (!anAIS) {
-    anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, sketch()->coordinatePlane());
-  }
+  AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, sketch()->coordinatePlane(),
+                                                                      thePrevious);
   return anAIS;
 }