Salome HOME
For the issue #2903 : make only latest feature become invalid because of python scrip...
[modules/shaper.git] / src / Model / Model_AttributeValidator.cpp
index ab01428148b1f47f90fab019e49e2182233914a0..135a6a423332217dac18c91ccc0f5d0de5093205 100644 (file)
@@ -136,9 +136,13 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
                   continue;
                 if (ModelAPI_Session::get()->validators()->isConcealed(
                     aRefFeat->getKind(), (*aRR)->id())) {
-                  theError = "Reference to concealed object %1";
-                  theError.arg(aRefd->data()->name());
-                  return false;
+                  // check this feature is later than another referenced to make unit tests working
+                  //because of Test1757 and others: allow to move selection context of this to next
+                  if (aFeat->document()->isLater(aFeat, aRefFeat)) {
+                    theError = "Reference to concealed object %1";
+                    theError.arg(aRefd->data()->name());
+                    return false;
+                  }
                 }
               }
               if (aCheckFeature)