X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Update.cpp;h=fe86d7a28adceca6f28310204c29155bbf6ce631;hb=853e0eec6016120b641efa6adf427a239cf203cf;hp=eed45d3041b262b776cccffe54a24bb5d60a96cd;hpb=f33fdfb7bbe5fb3c47a33e98fee099256b10b6f4;p=modules%2Fshaper.git diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index eed45d304..fe86d7a28 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -202,7 +202,7 @@ void Model_Update::iterateUpdateBreak(std::shared_ptr theFeatu } // for the current breaked, set iteration to this feature precisely aBreaked->setCurrentBefore(theFeature); - myModification++; + //myModification++; } // the iterator that contains breaked is found, so, nothing else is needed return; @@ -275,7 +275,7 @@ void Model_Update::updateFeature(FeaturePtr theFeature) return; #ifdef DEB_UPDATE - //std::cout<<"Update Feature "<name()<name()<(theFeature); // If automatice update is not needed and feature attributes were not updated right now, @@ -298,7 +298,9 @@ void Model_Update::updateFeature(FeaturePtr theFeature) if (!iterateUpdate(aCompos)) return; // iteration was interrupted, so, interrupt the update of this feature (it will be done later) // reupdate arguments of composite feature: it may be changed during subs execution - if (theFeature->data()->execState() != ModelAPI_StateMustBeUpdated) + + // issue 955: extrusion fuse sketch naming must be updated after the sketch update + // so, comment this: if (theFeature->data()->execState() != ModelAPI_StateMustBeUpdated) updateArguments(theFeature); } // this checking must be after the composite feature sub-elements processing: @@ -356,6 +358,9 @@ void Model_Update::updateFeature(FeaturePtr theFeature) #endif executeFeature(theFeature); } else { + #ifdef DEB_UPDATE + std::cout<<"Feature is not valid, erase results "<name()<eraseResults(); redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated } @@ -589,7 +594,8 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { // composite feature must be executed after sub-features execution if (aCompos) { // number of subs can be changed in execution: like fillet - for(int a = 0; a < aCompos->numberOfSubs(); a++) { + int aNumSubs = aCompos->numberOfSubs(); + for(int a = 0; a < aNumSubs; a++) { FeaturePtr aSub = aCompos->subFeature(a); if (aSub.get() && aState == ModelAPI_StateDone) { if (isOlder(theFeature, aSub)) { @@ -605,6 +611,8 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { } } } + if (a == aNumSubs - 1) // in case number of subs is changed, just recheck before end + aNumSubs = aCompos->numberOfSubs(); } } @@ -677,7 +685,14 @@ void Model_Update::IterationItem::next() break; } } else if (mySub.get()) { - mySub = myObjects->nextFeature(mySub); + while(mySub.get()) { + mySub = myObjects->nextFeature(mySub); + CompositeFeaturePtr anOwner = ModelAPI_Tools::compositeOwner(mySub); + // skip sub-objects, that are subs not only for this: sketch elements relatively to PartSet + if (!anOwner.get()) { + break; + } + } } } }