From: mpv Date: Fri, 30 Nov 2018 13:18:15 +0000 (+0300) Subject: Fix for slow-down of features creation on many Exctrusion-Cut features referenced... X-Git-Tag: End2018~125 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d15257bb6211be57401bfd9894e24c738037c07a;p=modules%2Fshaper.git Fix for slow-down of features creation on many Exctrusion-Cut features referenced to each other. --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 0f9fbcea5..7d0feab8b 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -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(aRefFeat)) { - if (!isLaterByDep(theThis, aRefFeat)) // nested composites: recursion - return false; - } + //if (std::dynamic_pointer_cast(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); }