Salome HOME
Bug with creaion of actor in study restored from file
authorvsv <vsv@opencascade.com>
Wed, 22 Jun 2005 11:11:30 +0000 (11:11 +0000)
committervsv <vsv@opencascade.com>
Wed, 22 Jun 2005 11:11:30 +0000 (11:11 +0000)
src/VISU_I/VISU_Prs3d_i.cc

index 5ae2f8ab245ca287d26c2c3837aa139b6b28eda1..eefadebe1025280095e708c079d2788fe3411ea7 100644 (file)
@@ -81,13 +81,13 @@ void VISU::Prs3d_i::CreateActor(VISU_Actor* theActor, const Handle(SALOME_Intera
 {
   try{
     Update();
-    if(myAddToStudy){
-      Handle(SALOME_InteractiveObject) anIO = theIO;
-      if(anIO.IsNull()){
-       anIO = new SALOME_InteractiveObject(mySObject->GetID(),"VISU",GetName());
-      }
+    //    if(myAddToStudy){
+    Handle(SALOME_InteractiveObject) anIO = theIO;
+    if(anIO.IsNull() && (!mySObject->_is_nil())){
+      anIO = new SALOME_InteractiveObject(mySObject->GetID(),"VISU",GetName());
       theActor->setIO(anIO); 
     }
+      // }
     theActor->SetPipeLine(GetPipeLine());
     theActor->SetPrs3d(this);
   }catch(std::bad_alloc& ex){