From: mpv Date: Fri, 29 May 2015 14:37:39 +0000 (+0300) Subject: Fix the naming issues of Extrusion created on sketch: sketch result was updated too... X-Git-Tag: V_1.2.0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2fbe8125820a68dc99915086b03843f037ae22b6;p=modules%2Fshaper.git Fix the naming issues of Extrusion created on sketch: sketch result was updated too often that made extrusion naming references invalid --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index b5250e8c3..1decb449c 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -181,7 +181,7 @@ void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Prism& theFeature, if(theBasis->isEqual(theContext)) theResultBody->store(theFeature.shape()); else - theResultBody->storeGenerated(theContext, theFeature.shape()); + theResultBody->storeGenerated(theBasis, theFeature.shape()); GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape(); theFeature.mapOfShapes(*aSubShapes); diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index ffbb7de24..d3cc6c9c1 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -402,10 +402,13 @@ void Model_Update::updateFeature(FeaturePtr theFeature) for(; aRef != aRefs.end(); aRef++) { std::list::iterator aRefObj = aRef->second.begin(); for(; aRefObj != aRef->second.end(); aRefObj++) { - // if reference is null, it may bmean that this reference is to other document + // if reference is null, it may mean that this reference is to other document // the does not supported by RefList: peremeters may be recomputed - if (!aRefObj->get() || myJustCreated.find(*aRefObj) != myJustCreated.end() || - myJustUpdated.find(*aRefObj) != myJustUpdated.end()) { + if (!aRefObj->get() && theFeature->firstResult().get() && + theFeature->firstResult()->groupName() == ModelAPI_ResultParameter::group()) { + aJustUpdated = true; + } else if (myJustCreated.find(*aRefObj) != myJustCreated.end() || + myJustUpdated.find(*aRefObj) != myJustUpdated.end()) { aJustUpdated = true; } aState = stateByReference(*aRefObj, aState);