]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #671 - Removing object used in feature creation with optional parameters.
authorspo <sergey.pokhodenko@opencascade.com>
Mon, 6 Jul 2015 11:38:30 +0000 (14:38 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Mon, 6 Jul 2015 13:50:05 +0000 (16:50 +0300)
src/Model/Model_Validator.cpp

index 9875f74274a9af41843c9140761b3273f224734d..ea64242f08ab4127991c38839893a34f277ac3bd 100644 (file)
@@ -196,6 +196,9 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
       std::map<std::string, AttrValidators>::const_iterator anAttr = 
           aFeatureIter->second.find(*anAttrIter);
       if (anAttr != aFeatureIter->second.end()) {
+        // skip not-case attributres, that really may be invalid (issue 671)
+        if (!const_cast<Model_ValidatorsFactory*>(this)->isCase(theFeature, anAttr->first))
+          continue;
         AttrValidators::const_iterator aValIter = anAttr->second.cbegin();
         for (; aValIter != anAttr->second.cend(); aValIter++) {
           std::map<std::string, ModelAPI_Validator*>::const_iterator aFound = myIDs.find(