]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for slow-down of features creation on many Exctrusion-Cut features referenced...
authormpv <mpv@opencascade.com>
Fri, 30 Nov 2018 13:18:15 +0000 (16:18 +0300)
committermpv <mpv@opencascade.com>
Fri, 30 Nov 2018 13:18:39 +0000 (16:18 +0300)
src/Model/Model_Document.cpp

index 0f9fbcea5b1ef796f47cbcf28171d7f1c2acd895..7d0feab8bf87c8c3e2d1aa6613dcfd3399e0250b 100755 (executable)
@@ -1613,14 +1613,21 @@ bool Model_Document::isLaterByDep(FeaturePtr theThis, FeaturePtr theOther) {
         if (aRefFeat.get()) {
           if (aRefFeat == theThis)
             return false; // other references to this, so other later than this
-          if (std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aRefFeat)) {
-            if (!isLaterByDep(theThis, aRefFeat)) // nested composites: recursion
-              return false;
-          }
+          //if (std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aRefFeat)) {
+          //  if (!isLaterByDep(theThis, aRefFeat)) // nested composites: recursion
+          //    return false;
+          //}
         }
       }
     }
   }
+  FeaturePtr aThisOwner = ModelAPI_Tools::compositeOwner(theThis);
+  if (aThisOwner.get()) {
+    if (aThisOwner == theOther)
+      return true; // composite owner is later that its sub
+    if (!isLaterByDep(aThisOwner, theOther))
+      return false;
+  }
   return myObjs->isLater(theThis, theOther);
 }