From abfd74e719f324d8008ed2e51fc3623bddba2202 Mon Sep 17 00:00:00 2001 From: dbv Date: Wed, 5 Apr 2017 17:23:57 +0300 Subject: [PATCH] Fixed validator for Boolean feature. --- .../GeomValidators_BooleanArguments.cpp | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) 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; } } } -- 2.39.2