Salome HOME
Pipe validator fix
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintFixed.cpp
index 012a45423c05873fa2e3a10425f3a4cf0b80a82a..13c2fa50dc47e3dc377e92f84dc4b78bb969c926 100644 (file)
@@ -69,7 +69,7 @@ void SketchSolver_ConstraintFixed::getAttributes(
   EntityWrapperPtr aSolverEntity;
   if (myBaseFeature) {
     // The feature is fixed.
-    myStorage->update(myBaseFeature, myGroupID);
+    myStorage->update(myBaseFeature/*, myGroupID*/);
     aSolverEntity = myStorage->entity(myBaseFeature);
   } else if (myBaseConstraint) {
     // Constraint Fixed is added by user.
@@ -100,8 +100,10 @@ bool SketchSolver_ConstraintFixed::remove()
   if (myBaseConstraint && myFixedAttribute) {
     if (myFixedAttribute->isObject())
       aFeature = ModelAPI_Feature::feature(myFixedAttribute->object());
-    else
-      myStorage->update(AttributePtr(myFixedAttribute), myGroupID);
+    else {
+      if (myFixedAttribute->attr().get())
+        myStorage->update(AttributePtr(myFixedAttribute), myGroupID);
+    }
   }
   if (aFeature)
     myStorage->update(aFeature, myGroupID);