From 419dd33332936208d03ab20bf7ab4925b448f539 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 21 Jan 2015 11:24:38 +0300 Subject: [PATCH] Issue #360: fix of disappearance of sketch result because sub-results are not ready yet --- src/Model/Model_Document.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.39.2