]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
The probelem of the previous bug was not in bad BOOST implementation of signals libra...
authorapo <apo@opencascade.com>
Fri, 30 Nov 2007 07:08:29 +0000 (07:08 +0000)
committerapo <apo@opencascade.com>
Fri, 30 Nov 2007 07:08:29 +0000 (07:08 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc

index 043668b826d9260cae1a6a256d836f6200e1d3f8..dd973c563011f98428ffd336339c4cb437a4c557 100644 (file)
@@ -205,16 +205,31 @@ void
 VISU::ColoredPrs3d_i
 ::UpdateFromResult(Result_i* theResult)
 {
-  try{
-    if(theResult == GetCResult()){
-      DoSetInput(false, false);
-      UpdateActors();
+  struct TEvent: public SALOME_Event
+  {
+    VISU::ColoredPrs3d_i* myColoredPrs3d;
+
+    TEvent(VISU::ColoredPrs3d_i* theColoredPrs3d):
+      myColoredPrs3d(theColoredPrs3d)
+    {}
+    
+    virtual
+    void
+    Execute()
+    {
+      try{
+       myColoredPrs3d->DoSetInput(false, false);
+       myColoredPrs3d->UpdateActors();
+      }catch(std::exception& exc){
+       INFOS("Follow exception was occured :\n"<<exc.what());
+      }catch(...){
+       INFOS("Unknown exception was occured!");
+      }
     }
-  }catch(std::exception& exc){
-    INFOS("Follow exception was occured :\n"<<exc.what());
-  }catch(...){
-    INFOS("Unknown exception was occured!");
-  }
+  };
+
+  if ( theResult == GetCResult() ) 
+    ProcessVoidEvent(new TEvent(this));
 }
 
 
@@ -271,8 +286,7 @@ VISU::ColoredPrs3d_i
     if(!IsRangeFixed() && theReInit)
       SetSourceRange();
 
-    if(GetPublishInStudyMode() != EDoNotPublish)
-      GetCResult()->ConnectObserver(this, myResultConnection);
+    GetCResult()->ConnectObserver(this, myResultConnection);
 
     myPreviousEntity = myEntity;
     myPreviousFieldName = myFieldName;