]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Remove generation of error changed events since it is not used anymore
authormpv <mpv@opencascade.com>
Fri, 15 Apr 2016 05:48:36 +0000 (08:48 +0300)
committermpv <mpv@opencascade.com>
Fri, 15 Apr 2016 05:48:36 +0000 (08:48 +0300)
src/Model/Model_AttributeSelection.cpp
src/Model/Model_Data.cpp
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_Events.h

index 6462c7b8489c8009ca151f2f5cbc5f598fe26bdd..25f5d35339a28c04cd3e9a44af6e16c93b604f4f 100644 (file)
@@ -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
index 351f2e4d1dfdcf660d93b6608f9458692a6bd7cc..02e9b7add21b2bc0fe64a358682eff8dc943df84 100644 (file)
@@ -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()
index 16a7b9e3c740ee11a865b29cb91bfa429cf9497c..d49990aa5b267fd9b3e2b64e58136f3cf50f281a 100644 (file)
@@ -81,7 +81,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
       std::cout<<"*** Add process on finish "<<theFeature->name()<<std::endl;
 #endif
     updateArguments(theFeature);
-    if (theFeature->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
index 6a5d674e60391c89fa2b7a9c47d7161a3fff3685..ff549a6f809590a2efb96752a37bfe167c43eee8 100644 (file)
@@ -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)