From: apo Date: Fri, 30 Nov 2007 07:42:20 +0000 (+0000) Subject: Sorry, not so easy X-Git-Tag: mergeto_BR_Dev_For_4_0_07-Dec-07~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a68a2d97675cb62fa3ab4cb99f6b983385518bb1;p=modules%2Fvisu.git Sorry, not so easy --- diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index dd973c56..0069fcca 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -178,10 +178,11 @@ void VISU::ColoredPrs3d_i ::RemoveFromStudy() { - struct TRemoveFromStudy: public SALOME_Event + struct TEvent: public SALOME_Event { VISU::ColoredPrs3d_i* myRemovable; - TRemoveFromStudy(VISU::ColoredPrs3d_i* theRemovable): + + TEvent(VISU::ColoredPrs3d_i* theRemovable): myRemovable(theRemovable) {} @@ -190,13 +191,15 @@ VISU::ColoredPrs3d_i Execute() { SALOMEDS::SObject_var aSObject = myRemovable->GetSObject(); + if(!CORBA::is_nil(aSObject.in())) VISU::RemoveFromStudy(aSObject,false); + myRemovable->TSuperClass::RemoveFromStudy(); } }; - ProcessVoidEvent(new TRemoveFromStudy(this)); + ProcessVoidEvent(new TEvent(this)); } @@ -286,7 +289,8 @@ VISU::ColoredPrs3d_i if(!IsRangeFixed() && theReInit) SetSourceRange(); - GetCResult()->ConnectObserver(this, myResultConnection); + if(GetPublishInStudyMode() != EDoNotPublish) + GetCResult()->ConnectObserver(this, myResultConnection); myPreviousEntity = myEntity; myPreviousFieldName = myFieldName;