X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Update.cpp;h=653860b6b10525c08c5de1ccc49d11da175353f6;hb=cf042069d9ec6ec86389945f6973d338b6e6d753;hp=2390df8268e737bb4e0038bd0df4e4e4e38f58d6;hpb=a731f82dccbfdb67cbf8e8d617222a4d3e32018a;p=modules%2Fshaper.git diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 2390df826..653860b6b 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -50,7 +50,7 @@ Model_Update::Model_Update() aLoop->registerListener(this, kOpStartEvent); Config_PropManager::registerProp("Model update", "automatic_rebuild", "Rebuild immediately", - Config_Prop::Bool, "false"); + Config_Prop::Boolean, "false"); myIsAutomatic = Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true"; } @@ -221,8 +221,8 @@ bool Model_Update::updateFeature(FeaturePtr theFeature) CompositeFeaturePtr aComposite = std::dynamic_pointer_cast(theFeature); if (aComposite) { - int aSubsNum = aComposite->numberOfSubs(); - for(int a = 0; a < aSubsNum; a++) { + // number of subs can be changed in execution: like fillet + for(int a = 0; a < aComposite->numberOfSubs(); a++) { if (updateFeature(aComposite->subFeature(a))) aMustbeUpdated = true; } @@ -290,8 +290,8 @@ bool Model_Update::updateFeature(FeaturePtr theFeature) // for sketch after update of plane (by update of selection attribute) // but before execute, all sub-elements also must be updated (due to the plane changes) if (aComposite) { - int aSubsNum = aComposite->numberOfSubs(); - for(int a = 0; a < aSubsNum; a++) { + // number of subs can be changed in execution: like fillet + for(int a = 0; a < aComposite->numberOfSubs(); a++) { FeaturePtr aSub = aComposite->subFeature(a); bool aWasModified = myUpdated[aSub]; myUpdated.erase(myUpdated.find(aSub)); // erase to update for sure (plane may be changed) @@ -301,7 +301,7 @@ bool Model_Update::updateFeature(FeaturePtr theFeature) } // re-execute after update: solver may update the previous values, so, shapes must be // updated - for(int a = 0; a < aSubsNum; a++) { + for(int a = 0; a < aComposite->numberOfSubs(); a++) { if (aComposite->subFeature(a) && aFactory->validate(aComposite->subFeature(a))) aComposite->subFeature(a)->execute(); }