X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_ConstraintMulti.cpp;h=a86ab8b5fbd51731f26d30fdade40e31a67a402d;hb=4f565b2204d3fba046aa8c851abada2a5a17bf6c;hp=bd0a82ad3206962483ae6a6bffa4b5d5fe5b5fa8;hpb=c3aeb6b898054376c1047071ea9fea61abdc9e99;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_ConstraintMulti.cpp b/src/SketchSolver/SketchSolver_ConstraintMulti.cpp index bd0a82ad3..a86ab8b5f 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMulti.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMulti.cpp @@ -38,7 +38,7 @@ void SketchSolver_ConstraintMulti::getEntities(std::list& theE std::list anObjectList = aRefList->list(); std::list::iterator anObjIt = anObjectList.begin(); // execute for the feature is not called yet - if ((myNumberOfCopies + 1) * myNumberOfObjects != aRefList->size()) + if ((myNumberOfCopies + 1) * myNumberOfObjects != aRefList->size()) myNumberOfCopies = aRefList->size() / myNumberOfObjects - 1; while (anObjIt != anObjectList.end()) { @@ -47,7 +47,7 @@ void SketchSolver_ConstraintMulti::getEntities(std::list& theE continue; // the entity is not created, so it is a copy in "multi" constraint, force its creation - if (!myStorage->update(aFeature)) + if (!myStorage->update(aFeature)) myStorage->update(aFeature, myGroupID, true); theEntities.push_back(myStorage->entity(aFeature)); myFeatures.insert(aFeature); @@ -79,7 +79,7 @@ void SketchSolver_ConstraintMulti::update(bool isForce) AttributeIntegerPtr aNbObjects = myBaseConstraint->integer(nameNbObjects()); if (!anInitialRefList || !aNbObjects) return; // the "Multi" constraint is in queue to remove - bool isUpdated = + bool isUpdated = anInitialRefList->size() != myNumberOfObjects || aNbObjects->value()-1 != myNumberOfCopies; if (!isUpdated) { // additional check that the features and their copies are changed @@ -161,8 +161,9 @@ void SketchSolver_ConstraintMulti::adjustConstraint() continue; anEntity = myStorage->entity(aFeature); + bool aWasBlocked = false; if (!anEntity || !myStorage->isEventsBlocked()) - aFeature->data()->blockSendAttributeUpdated(true); + aWasBlocked = aFeature->data()->blockSendAttributeUpdated(true); std::list aPoints; if (aFeature->getKind() == SketchPlugin_Arc::ID()) { @@ -203,7 +204,7 @@ void SketchSolver_ConstraintMulti::adjustConstraint() } if (!anEntity || !myStorage->isEventsBlocked()) - aFeature->data()->blockSendAttributeUpdated(false); + aFeature->data()->blockSendAttributeUpdated(aWasBlocked); } }