Salome HOME
Fix for the issue #2528 : No more results after parameters edition canceled
[modules/shaper.git] / src / Model / Model_Objects.cpp
index 21120233efc24c06231694386b37440745599082..b3b21793043789b434d0c4b7a51e2f4123786290 100644 (file)
@@ -1891,6 +1891,15 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set<FeaturePtr>& t
       }
     }
   }
+  if (aResSize > 0) { // check there exist a body that must be updated
+    std::list<ResultPtr>::const_iterator aRes = theFeature->results().cbegin();
+    for (; aResSize && aRes != theFeature->results().cend(); aRes++, aResSize++) {
+      if ((*aRes)->data()->isValid() && (*aRes)->groupName() == ModelAPI_ResultBody::group()) {
+        ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aRes);
+        aBody->updateSubs(aBody->shape());
+      }
+    }
+  }
 }
 
 ResultPtr Model_Objects::findByName(const std::string theName)