Salome HOME
Fix for the issue #2814 : error when dump/load script from valid document
authormpv <mpv@opencascade.com>
Tue, 18 Dec 2018 12:04:52 +0000 (15:04 +0300)
committermpv <mpv@opencascade.com>
Tue, 18 Dec 2018 12:05:07 +0000 (15:05 +0300)
src/Model/Model_ResultBody.cpp

index c226ac7626e8ac6994eb2905f7cfa6f4864d89e2..8f8c218bb0bbc22529f54ddf102bd352c96c2066 100644 (file)
@@ -271,8 +271,9 @@ void Model_ResultBody::updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisS
       } else { // just update shape of this result
         aSub = mySubs[aSubIndex];
       }
-      if (!aShape->isEqual(aSub->shape())) {
-        aSub->store(aShape, false);
+      GeomShapePtr anOldSubShape = aSub->shape();
+      aSub->store(aShape, false); // store even equal to call "clear": #2814
+      if (!aShape->isEqual(anOldSubShape)) {
         aECreator->sendUpdated(aSub, EVENT_DISP);
         aECreator->sendUpdated(aSub, EVENT_UPD);
       }