From: dbv Date: Wed, 5 Apr 2017 14:23:57 +0000 (+0300) Subject: Fixed validator for Boolean feature. X-Git-Tag: V_2.7.0~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=abfd74e719f324d8008ed2e51fc3623bddba2202;p=modules%2Fshaper.git Fixed validator for Boolean feature. --- diff --git a/src/GeomValidators/GeomValidators_BooleanArguments.cpp b/src/GeomValidators/GeomValidators_BooleanArguments.cpp index 54cb1069e..7890550f2 100644 --- a/src/GeomValidators/GeomValidators_BooleanArguments.cpp +++ b/src/GeomValidators/GeomValidators_BooleanArguments.cpp @@ -46,6 +46,7 @@ bool GeomValidators_BooleanArguments::isValid(const std::shared_ptrselectionList(*anIt); if(anAttrSelList) { aToolsNb = anAttrSelList->size(); - for(int anIndex = 0; anIndex < aToolsNb; ++anIndex) { - AttributeSelectionPtr anAttr = anAttrSelList->value(anIndex); - ResultPtr aContext = anAttr->context(); - ResultCompSolidPtr aResCompSolidPtr = ModelAPI_Tools::compSolidOwner(aContext); - if(aResCompSolidPtr.get()) { - if(aCompSolid.get()) { - isAllInSameCompSolid = aCompSolid == aResCompSolidPtr; + if(isAllInSameCompSolid) { + for(int anIndex = 0; anIndex < aToolsNb; ++anIndex) { + AttributeSelectionPtr anAttr = anAttrSelList->value(anIndex); + ResultPtr aContext = anAttr->context(); + ResultCompSolidPtr aResCompSolidPtr = ModelAPI_Tools::compSolidOwner(aContext); + if(aResCompSolidPtr.get()) { + if(aCompSolid.get()) { + isAllInSameCompSolid = aCompSolid == aResCompSolidPtr; + } else { + aCompSolid = aResCompSolidPtr; + } } else { - aCompSolid = aResCompSolidPtr; + isAllInSameCompSolid = false; + break; } - } else { - isAllInSameCompSolid = false; } } }