X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Update.cpp;h=51eba966c182977e5787340582512cc134b426e3;hb=f7a976b98d8cadadcb54a61e42ddb66e00759689;hp=91751aa772becc664787e5ce6007dfe6f0c17507;hpb=94a0bf3ae8768e2f4ec5848692276dca05208e80;p=modules%2Fshaper.git diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 91751aa77..51eba966c 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -67,8 +67,11 @@ void Model_Update::processEvent(const std::shared_ptr& theMessag static const Events_ID kOpStartEvent = aLoop->eventByName("StartOperation"); bool isAutomaticChanged = false; if (theMessage->eventID() == kChangedEvent) { // automatic and manual rebuild flag is changed - isAutomatic = - Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true"; + bool aPropVal = + Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true"; + if (aPropVal == isAutomatic) + return;// nothing to + isAutomatic = aPropVal; } else if (theMessage->eventID() == kRebuildEvent) { // the rebuild command if (isAutomatic == false) { isAutomaticChanged = true; @@ -155,7 +158,7 @@ void Model_Update::updateInDoc(std::shared_ptr theDoc) // all sub-documents one by one std::shared_ptr aDoc = std::dynamic_pointer_cast(theDoc); if (aDoc) { - const std::set& aSubs = aDoc->subDocuments(); + const std::set aSubs = aDoc->subDocuments(true); for(std::set::iterator aSub = aSubs.begin(); aSub != aSubs.end(); aSub++) { DocumentPtr aSubDoc = theDoc->subDocument(*aSub); if (aSubDoc) { @@ -256,7 +259,8 @@ bool Model_Update::updateFeature(FeaturePtr theFeature) std::shared_ptr aSel = std::dynamic_pointer_cast(*aRefsIter); if (!aSel->update()) { // this must be done on execution since it may be long operation - if (!aFactory->isNotObligatory(theFeature->getKind(), theFeature->data()->id(aSel))) + if (!aFactory->isNotObligatory(theFeature->getKind(), theFeature->data()->id(aSel)) && + aFactory->isCase(theFeature, theFeature->data()->id(aSel))) aState = ModelAPI_StateInvalidArgument; } } @@ -270,7 +274,8 @@ bool Model_Update::updateFeature(FeaturePtr theFeature) if (aSelAttr) { if (!aSelAttr->update()) { if (!aFactory->isNotObligatory( - theFeature->getKind(), theFeature->data()->id(aSel))) + theFeature->getKind(), theFeature->data()->id(aSel)) && + aFactory->isCase(theFeature, theFeature->data()->id(aSel))) aState = ModelAPI_StateInvalidArgument; } }