From 4054eece6a445fb048a984b70a72ae3cb8ddb8e5 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 30 Nov 2007 07:08:29 +0000 Subject: [PATCH] The probelem of the previous bug was not in bad BOOST implementation of signals library (it seems that it really disconnect its observers, when it is destroyed), but, as usual, in not thread safety of our own code --- src/VISU_I/VISU_ColoredPrs3d_i.cc | 36 +++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 043668b8..dd973c56 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -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"<ConnectObserver(this, myResultConnection); + GetCResult()->ConnectObserver(this, myResultConnection); myPreviousEntity = myEntity; myPreviousFieldName = myFieldName; -- 2.39.2