From: apo Date: Wed, 19 Apr 2006 11:35:10 +0000 (+0000) Subject: To explicitly specify what should be changed when the actor changes its reprsentation... X-Git-Tag: T3_2_0b1_pre1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=510cca84156a6c5dd2559f5564c853af461a27ae;p=modules%2Fgui.git 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. --- 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; }