if (anIter->setDisabled(aDisabledFlag)) {
static Events_ID anUpdateEvent = aLoop->eventByName(EVENT_OBJECT_UPDATED);
// state of feature is changed => so inform that it must be updated if it has such state
- if (!aDisabledFlag && anIter->data()->execState() == ModelAPI_StateMustBeUpdated)
+ if (!aDisabledFlag &&
+ (anIter->data()->execState() == ModelAPI_StateMustBeUpdated || anIter->data()->execState() == ModelAPI_StateInvalidArgument))
ModelAPI_EventCreator::get()->sendUpdated(anIter, anUpdateEvent);
// flush is in the end of this method
ModelAPI_EventCreator::get()->sendUpdated(anIter, aRedispEvent /*, false*/);
#include <Events_InfoMessage.h>
#include <ModelAPI_Feature.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include "ModelHighAPI_Selection.h"
//--------------------------------------------------------------------------------------
void ModelHighAPI_Interface::execute()
{
- feature()->execute();
+ SessionPtr aMgr = ModelAPI_Session::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+ FeaturePtr aFeature = feature();
+ if(aFactory->validate(aFeature)) {
+ aFeature->execute();
+ }
}
std::list<ModelHighAPI_Selection> ModelHighAPI_Interface::result() const