]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_2.1.0' of salome:modules/shaper into Dev_2.1.0
authormpv <mpv@opencascade.com>
Tue, 22 Dec 2015 14:08:19 +0000 (17:08 +0300)
committermpv <mpv@opencascade.com>
Tue, 22 Dec 2015 14:08:19 +0000 (17:08 +0300)
src/SketchSolver/SketchSolver_Storage.cpp

index f5617bbea6d11168816e2f8e720bf191c313121d..acefc6396f92eab1282fd7eda5deec61f8910077 100644 (file)
@@ -92,9 +92,11 @@ void SketchSolver_Storage::addEntity(FeaturePtr       theFeature,
     std::list<AttributePtr>::const_iterator anAttrIt = aPntAttrs.begin();
     for (; anAttrIt != aPntAttrs.end(); ++anAttrIt)
         addEntity(*anAttrIt, EntityWrapperPtr());
-  }
+    if (aFound == myFeatureMap.end())
+      myFeatureMap[theFeature] = theSolverEntity;
+  } else
+    myFeatureMap[theFeature] = theSolverEntity;
 
-  myFeatureMap[theFeature] = theSolverEntity;
   // block events if necessary
   if (myEventsBlocked && theFeature->data() && theFeature->data()->isValid())
     theFeature->data()->blockSendAttributeUpdated(myEventsBlocked);
@@ -108,7 +110,8 @@ void SketchSolver_Storage::addEntity(AttributePtr     theAttribute,
      (theSolverEntity && !aFound->second->isEqual(theSolverEntity)))
     setNeedToResolve(true); // the entity is new or modified
 
-  myAttributeMap[theAttribute] = theSolverEntity;
+  if (theSolverEntity || aFound == myAttributeMap.end())
+    myAttributeMap[theAttribute] = theSolverEntity;
   // block events if necessary
   if (myEventsBlocked && theAttribute->owner() &&
       theAttribute->owner()->data() && theAttribute->owner()->data()->isValid())