From: mpv Date: Fri, 15 Apr 2016 05:48:36 +0000 (+0300) Subject: Remove generation of error changed events since it is not used anymore X-Git-Tag: V_2.3.0~219 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=50d485dcce6008f9225174114ff157f52cf2d388;p=modules%2Fshaper.git Remove generation of error changed events since it is not used anymore --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 6462c7b84..25f5d3533 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -475,7 +475,7 @@ bool Model_AttributeSelection::update() } if (aShapeType == TopAbs_FACE || aShapeType == TopAbs_WIRE) { // compound is for the whole sketch selection - // If this is a wire with plane defined thin it is a sketch-like object + // If this is a wire with plane defined then it is a sketch-like object if (!aConstructionContext->facesNum()) // no faces, update can not work correctly return setInvalidIfFalse(aSelLab, false); // if there is no edges indexes, any face can be used: take the first diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 351f2e4d1..02e9b7add 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -348,9 +348,6 @@ void Model_Data::execState(const ModelAPI_ExecState theState) if (stateArray(myLab)->Value(STATE_INDEX_STATE) != (int)theState) { stateArray(myLab)->SetValue(STATE_INDEX_STATE, (int)theState); } - // send signal even if the new value corresponds to the one in data model: undo issue 980 - static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_ERROR_CHANGED); - ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent, false); } } @@ -376,8 +373,6 @@ void Model_Data::setError(const std::string& theError, bool theSend) 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() diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 16a7b9e3c..d49990aa5 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -81,7 +81,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) { std::cout<<"*** Add process on finish "<name()<data()->execState() == ModelAPI_StateMustBeUpdated || myIsPreviewBlocked) { + if (theFeature->data()->execState() == ModelAPI_StateMustBeUpdated) { theFeature->data()->execState(ModelAPI_StateDone); static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators(); aFactory->validate(theFeature); // need to be validated to update the "Apply" state if not previewed diff --git a/src/ModelAPI/ModelAPI_Events.h b/src/ModelAPI/ModelAPI_Events.h index 6a5d674e6..ff549a6f8 100644 --- a/src/ModelAPI/ModelAPI_Events.h +++ b/src/ModelAPI/ModelAPI_Events.h @@ -34,8 +34,6 @@ static const char * EVENT_OBJECT_RENAMED = "ObjectRenamed"; 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)