From: mpv Date: Wed, 21 Jan 2015 08:24:38 +0000 (+0300) Subject: Issue #360: fix of disappearance of sketch result because sub-results are not ready yet X-Git-Tag: V_1.0.0~22^2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=419dd33332936208d03ab20bf7ab4925b448f539;p=modules%2Fshaper.git Issue #360: fix of disappearance of sketch result because sub-results are not ready yet --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 65d4cb70b..fb6ebf8e4 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -844,14 +845,21 @@ void Model_Document::synchronizeFeatures(const bool theMarkUpdated, const bool t } } // update results of thefeatures (after features created because they may be connected, like sketch and sub elements) + std::list aComposites; // composites must be updated after their subs (issue 360) TDF_ChildIDIterator aLabIter2(featuresLabel(), TDataStd_Comment::GetID()); for (; aLabIter2.More(); aLabIter2.Next()) { TDF_Label aFeatureLabel = aLabIter2.Value()->Label(); if (myObjs.IsBound(aFeatureLabel)) { // a new feature is inserted FeaturePtr aFeature = myObjs.Find(aFeatureLabel); + if (std::dynamic_pointer_cast(aFeature).get()) + aComposites.push_back(aFeature); updateResults(aFeature); } } + std::list::iterator aComposite = aComposites.begin(); + for(; aComposite != aComposites.end(); aComposite++) { + updateResults(*aComposite); + } // check all features are checked: if not => it was removed NCollection_DataMap::Iterator aFIter(myObjs);