X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_FeatureValidator.cpp;h=b3b1b821687f13ebdadaed93bc9ed4772fde4f02;hb=4cc670477fa518dd1e90c709d28711ffdbc90085;hp=2bbad12d176b27e3f24b3067235b69657732e48a;hpb=eb46781716082e5c57561426894fe4c0c989224e;p=modules%2Fshaper.git diff --git a/src/Model/Model_FeatureValidator.cpp b/src/Model/Model_FeatureValidator.cpp index 2bbad12d1..b3b1b8216 100644 --- a/src/Model/Model_FeatureValidator.cpp +++ b/src/Model/Model_FeatureValidator.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Model_FeatureValidator.cpp // Created: 8 Jul 2014 // Author: Vitaly SMETANNIKOV @@ -15,8 +17,10 @@ bool Model_FeatureValidator::isValid(const std::shared_ptr& th const std::list& theArguments) const { std::shared_ptr aData = theFeature->data(); - if (!aData) - return false; + // "Action" features has no data, but still valid. e.g "Remove Part" + if (!aData) { + return theFeature->isAction(); + } if (!aData->isValid()) return false; const std::string kAllTypes = ""; @@ -24,10 +28,10 @@ bool Model_FeatureValidator::isValid(const std::shared_ptr& th std::list::iterator it = aLtAttributes.begin(); for (; it != aLtAttributes.end(); it++) { AttributePtr anAttr = aData->attribute(*it); - if (!anAttr->isInitialized()) { + if (!anAttr->isInitialized()) { // attribute is not initialized std::map >::const_iterator aFeatureFind = myNotObligatory.find(theFeature->getKind()); - if (aFeatureFind == myNotObligatory.end() || + if (aFeatureFind == myNotObligatory.end() || // and it is obligatory for filling aFeatureFind->second.find(*it) == aFeatureFind->second.end()) { return false; }