]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/SketchSolver_Constraint.cpp
Salome HOME
Do not allow user to move fixed entities (issue #1043)
[modules/shaper.git] / src / SketchSolver / SketchSolver_Constraint.cpp
index 11cdff04bb22f3a64ba17e97d661ef9ce38d2a12..b4b888fa3b75607f333ce26e27e8779247068f31 100644 (file)
@@ -394,6 +394,10 @@ Slvs_hEntity SketchSolver_Constraint::changeEntity(AttributePtr theEntity, int&
   }
 
   Slvs_hGroup aGroupID = myGroup->getId();
+  // do not update entity from another group
+  if (aCurrentEntity.h != SLVS_E_UNKNOWN && aGroupID != aCurrentEntity.group)
+    return aCurrentEntity.h;
+
   // Point in 3D
   std::shared_ptr<GeomDataAPI_Point> aPoint =
       std::dynamic_pointer_cast<GeomDataAPI_Point>(theEntity);
@@ -488,6 +492,10 @@ Slvs_hEntity SketchSolver_Constraint::changeEntity(FeaturePtr theEntity, int& th
   }
 
   Slvs_hGroup aGroupID = myGroup->getId();
+  // do not update entity from another group
+  if (aCurrentEntity.h != SLVS_E_UNKNOWN && aGroupID != aCurrentEntity.group)
+    return aCurrentEntity.h;
+
   Slvs_hEntity aWorkplaneID = myGroup->getWorkplaneId();
   DataPtr aData = theEntity->data();