Salome HOME
Implementation of mechanism of grouping of messages
authornds <natalia.donis@opencascade.com>
Thu, 22 May 2014 13:44:41 +0000 (17:44 +0400)
committernds <natalia.donis@opencascade.com>
Thu, 22 May 2014 13:44:41 +0000 (17:44 +0400)
Debug corrections for line edition. Modification line by property panel. Move some lines

src/Events/Events_Loop.cpp
src/PartSet/PartSet_OperationEditLine.cpp
src/SketchSolver/SketchSolver_ConstraintManager.cpp
src/SketchSolver/SketchSolver_ConstraintManager.h

index 5a5a9442672406c62ebd8a7465cfa87bdb1608bd..40917a64f710c5b7d7c815fb3e8f62313ed0bd0d 100644 (file)
@@ -103,8 +103,8 @@ void Events_Loop::flush(const Events_ID& theID)
     myGroups.find(theID.eventText());
   if (aMyGroup != myGroups.end()) { // really sends
     Events_MessageGroup* aGroup = aMyGroup->second;
-    send(*aGroup, false);
     myGroups.erase(aMyGroup);
+    send(*aGroup, false);
     delete aGroup;
   }
 }
index 18d3bbc4df1576e0893d23dee64e91d183160c39..4cfbc3e9a4bb1326f056894e0697338626140828 100644 (file)
@@ -179,7 +179,7 @@ void PartSet_OperationEditLine::sendFeatures()
   std::list<XGUI_ViewerPrs>::const_iterator anIt = myFeatures.begin(), aLast = myFeatures.end();
   for (; anIt != aLast; anIt++) {
     boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
-    if (!aFeature || aFeature == feature())
+    if (!aFeature)
       continue;
 
     Model_FeatureUpdatedMessage aMessage(aFeature, anEvent);
index 7e9292037c4192003ad5a1cb68f0c05658ec1462..d8ae5bcd2e21ae7a91f7f60d63ae9208ed7e7fe7 100644 (file)
@@ -112,7 +112,7 @@ void SketchSolver_ConstraintManager::processEvent(const Events_Message* theMessa
     }
 
     // Solve the set of constraints
-    resolveConstraints(isModifiedEvt);
+    resolveConstraints();
   }
   else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_DELETED))
   {
@@ -278,15 +278,14 @@ boost::shared_ptr<SketchPlugin_Feature> SketchSolver_ConstraintManager::findWork
   return boost::shared_ptr<SketchPlugin_Feature>();
 }
 
-void SketchSolver_ConstraintManager::resolveConstraints(const bool needEvent)
+void SketchSolver_ConstraintManager::resolveConstraints()
 {
   std::vector<SketchSolver_ConstraintGroup*>::iterator aGroupIter;
   for (aGroupIter = myGroups.begin(); aGroupIter != myGroups.end(); aGroupIter++)
     (*aGroupIter)->resolveConstraints();
 
   // Features may be updated => send events
-  if (needEvent)
-    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
+  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
 }
 
 
index b833f54dc29fa701ff6e3e4046fa2ad320c92cd1..9cbb23bab85a60b03f8b6758f3e2e070ca1d06a1 100644 (file)
@@ -84,9 +84,8 @@ protected:
   void updateEntity(boost::shared_ptr<SketchPlugin_Feature> theFeature);
 
   /** \brief Goes through the list of groups and solve the constraints
-   *  \param[in] needEvent shows that some features are probably updated and Update event should be thrown
    */
-  void resolveConstraints(const bool needEvent);
+  void resolveConstraints();
 
 private:
   class SketchSolver_ConstraintGroup;