Salome HOME
Switch Wireframe/Shading with closing of context
[modules/shaper.git] / src / Model / Model_Update.cpp
index 7360d0d1ef51fe79f1dfe65b332b765b4fb75301..d6f02c5f79f2bf3eae4970f4042fa91e4b40f390 100644 (file)
@@ -82,6 +82,8 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
     std::set<ObjectPtr>::const_iterator anObjIter = anObjs.cbegin();
     for(; anObjIter != anObjs.cend(); anObjIter++) {
       myJustCreatedOrUpdated.insert(*anObjIter);
+      // TODO(mpv): check the next line. Came into dev 0.6.1 from BR_PYTHON_PLUGIN
+      // (*anObjIter)->data()->mustBeUpdated(true); // object must be updated because it was changed
     }
     if (theMessage->eventID() == kMovedEvent)
       return; // this event is for solver update, not here
@@ -153,7 +155,7 @@ void Model_Update::updateInDoc(std::shared_ptr<ModelAPI_Document> theDoc)
   // all sub-documents one by one
   std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(theDoc);
   if (aDoc) {
-    const std::set<std::string>& aSubs = aDoc->subDocuments();
+    const std::set<std::string> aSubs = aDoc->subDocuments(true);
     for(std::set<std::string>::iterator aSub = aSubs.begin(); aSub != aSubs.end(); aSub++) {
       DocumentPtr aSubDoc = theDoc->subDocument(*aSub);
       if (aSubDoc) {
@@ -329,7 +331,9 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
       } else { // for automatically updated features (on abort, etc) it is necessary to redisplay anyway
         redisplayWithResults(theFeature, ModelAPI_StateNothing);
       }
-    } else {  // returns also true is results were updated: for sketch that refers to sub-features but results of sub-features were changed
+    } else {
+      // returns also true is results were updated: for sketch that 
+      // refers to sub-features but results of sub-features were changed
       const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
       std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
       for (; aRIter != aResults.cend(); aRIter++) {