## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
##
-# Test that removed vertex, selected in the group makes group with one invalid element (empty shape)
+# Test that removed vertex, selected in the group makes empty group => invalid one
from salome.shaper import model
from ModelAPI import *
# Check group
aFactory = ModelAPI_Session.get().validators()
selectionList = Group_1.feature().selectionList("group_list")
-assert(selectionList.size() == 1)
+assert(selectionList.size() == 0)
assert(aFactory.validate(Group_1.feature()) == False)
if (!ModelAPI_Session::get()->validators()->isConcealed(
aRefFeat->getKind(), (*aRef)->id()))
continue;
- if (!theDoc->isLaterByDep(aRefFeat, aThisFeature)) {
- return true; // feature conceals result, return true, so the context will be removed
+ if (theDoc->isLaterByDep(aThisFeature, aRefFeat)) {
+ // for extrusion cut in python script the nested sketch reference may be concealed before
+ // it is nested, so, check this composite feature is valid
+ static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
+ // need to be validated to update the "Apply" state if not previewed
+ if (aFactory->validate(aRefFeat))
+ return true; // feature conceals result, return true, so the context will be removed
}
}
}
MODEL_EXPORT virtual std::string value();
protected:
- /// Initializes attibutes
+ /// Initializes attributes
Model_AttributeString(TDF_Label& theLabel);
/// Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)
virtual void reinit();