From: mpv Date: Thu, 3 Sep 2015 09:21:05 +0000 (+0300) Subject: Fix for the problem of update of BOP created on CompSolid every time (like Group... X-Git-Tag: V_1.4.0_beta4~139 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dbcf1539af60b7e4b1da03e99e7da6891d5cdb4e;p=modules%2Fshaper.git Fix for the problem of update of BOP created on CompSolid every time (like Group objects selection) --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 244aa6867..116a55daf 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -380,6 +380,23 @@ void Model_Update::redisplayWithResults(FeaturePtr theFeature, const ModelAPI_Ex aRes->data()->setUpdateID(theFeature->data()->updateID()); } ModelAPI_EventCreator::get()->sendUpdated(aRes, EVENT_DISP); + // iterate sub-bodies of compsolid + ResultCompSolidPtr aComp = std::dynamic_pointer_cast(aRes); + if (aComp.get()) { + int aNumSub = aComp->numberOfSubs(); + for(int a = 0; a < aNumSub; a++) { + ResultPtr aSub = aComp->subResult(a); + if (!aSub->isDisabled()) {// update state only for enabled results (Placement Result Part may make the original Part Result as invalid) + aSub->data()->execState(theState); + if (theState == ModelAPI_StateDone) // feature become "done", so execution changed results + myUpdated[aSub] = myModification; + } + if (theFeature->data()->updateID() > aSub->data()->updateID()) { + aSub->data()->setUpdateID(theFeature->data()->updateID()); + } + ModelAPI_EventCreator::get()->sendUpdated(aSub, EVENT_DISP); + } + } } // to redisplay "presentable" feature (for ex. distance constraint) ModelAPI_EventCreator::get()->sendUpdated(theFeature, EVENT_DISP);