]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1048
authormpv <mpv@opencascade.com>
Mon, 12 Oct 2015 11:56:20 +0000 (14:56 +0300)
committermpv <mpv@opencascade.com>
Mon, 12 Oct 2015 11:56:20 +0000 (14:56 +0300)
src/Model/Model_Document.cpp

index 9a22410eca4566a99156a66ae0ea8ce81a5ad392..2af4e964e1f81d2bdff21f9aa07c643efd914e66 100644 (file)
@@ -968,6 +968,17 @@ void Model_Document::setActive(const bool theFlag)
         std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes = aResList.begin();
         for(; aRes != aResList.end(); aRes++) {
           ModelAPI_EventCreator::get()->sendUpdated(*aRes, aRedispEvent);
+          // #issue 1048: sub-compsolids also
+          ResultCompSolidPtr aCompRes = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(*aRes);
+          if (aCompRes.get()) {
+            int aNumSubs = aCompRes->numberOfSubs();
+            for(int a = 0; a < aNumSubs; a++) {
+              ResultPtr aSub = aCompRes->subResult(a);
+              if (aSub.get()) {
+                ModelAPI_EventCreator::get()->sendUpdated(aSub, aRedispEvent);
+              }
+            }
+          }
         }
       }
     }