From 510cca84156a6c5dd2559f5564c853af461a27ae Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 19 Apr 2006 11:35:10 +0000 Subject: [PATCH] To explicitly specify what should be changed when the actor changes its reprsentation mode, in other case some properties like line width or opacity is throught out. --- src/VTKViewer/VTKViewer_Actor.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 4c83a2774..11769256c 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -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; } -- 2.39.2