]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To explicitly specify what should be changed when the actor changes its reprsentation...
authorapo <apo@opencascade.com>
Wed, 19 Apr 2006 11:35:10 +0000 (11:35 +0000)
committerapo <apo@opencascade.com>
Wed, 19 Apr 2006 11:35:10 +0000 (11:35 +0000)
src/VTKViewer/VTKViewer_Actor.cxx

index 4c83a27746e17a62e986f7ff473552806b3f4707..11769256c1474d55cd431fb0395d806ea354ca74 100755 (executable)
@@ -307,18 +307,25 @@ VTKViewer_Actor
   switch(myRepresentation){
   case VTK_POINTS : 
   case VTK_SURFACE : 
-    myProperty->DeepCopy(GetProperty());
+    myProperty->SetAmbient(GetProperty()->GetAmbient());
+    myProperty->SetDiffuse(GetProperty()->GetDiffuse());
+    myProperty->SetSpecular(GetProperty()->GetSpecular());
+    break;
   }    
+
   switch(theMode){
   case VTK_POINTS : 
   case VTK_SURFACE : 
-    GetProperty()->DeepCopy(myProperty);
+    GetProperty()->SetAmbient(myProperty->GetAmbient());
+    GetProperty()->SetDiffuse(myProperty->GetDiffuse());
+    GetProperty()->SetSpecular(myProperty->GetSpecular());
     break;
   default:
     GetProperty()->SetAmbient(1.0);
     GetProperty()->SetDiffuse(0.0);
     GetProperty()->SetSpecular(0.0);
   }
+
   switch(theMode){
   case 3 : 
     myGeomFilter->SetInside(true);
@@ -342,6 +349,7 @@ VTKViewer_Actor
     myGeomFilter->SetInside(false);
     break;
   }
+
   myRepresentation = theMode;
 }