void Model_Data::execState(const ModelAPI_ExecState theState)
{
if (theState != ModelAPI_StateNothing) {
- stateArray(myLab)->SetValue(STATE_INDEX_STATE, (int)theState);
+ if (stateArray(myLab)->Value(STATE_INDEX_STATE) != (int)theState) {
+ stateArray(myLab)->SetValue(STATE_INDEX_STATE, (int)theState);
+ static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_ERROR_CHANGED);
+ ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent, false);
+ }
}
}
Events_Error::send(theError);
}
TDataStd_AsciiString::Set(myLab, theError.c_str());
+ static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_ERROR_CHANGED);
+ ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent, false);
}
void Model_Data::eraseErrorString()
static const char * EVENT_OBJECT_MOVED = "ObjectsMoved";
/// Event ID that visualization must be redisplayed (comes with ModelAPI_ObjectUpdatedMessage)
static const char * EVENT_OBJECT_TO_REDISPLAY = "ObjectsToRedisplay";
+/// Event ID that error state or error message was updated for the object
+static const char * EVENT_OBJECT_ERROR_CHANGED = "ObjectsErrorChanged";
/// Event ID that visualization must be redisplayed (comes with ModelAPI_ObjectUpdatedMessage)
static const char * EVENT_OPERATION_LAUNCHED = "OperationLaunched";
/// Event ID that plugin is loaded (comes with ModelAPI_ObjectUpdatedMessage)