From: rnv Date: Wed, 19 Feb 2014 12:43:32 +0000 (+0400) Subject: Fix problems with the OpenGL clipping planes. X-Git-Tag: V7_4_0a1~66 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=6e68fcd4978aadf5500a03d2899199889ed3efb9 Fix problems with the OpenGL clipping planes. --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 4ef6a5ceb..e8340e7e9 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -1313,7 +1313,7 @@ void SMESH_ActorDef::SetShrinkFactor(double theValue){ Modified(); } -void SMESH_ActorDef::SetShrink(){ +void SMESH_ActorDef::SetShrink() { if(!myIsShrinkable) return; myBaseActor->SetShrink(); @@ -2207,7 +2207,10 @@ SMESH_ActorDef::SetOpenGLClippingPlane() my3DExtActor->SetPlaneCollection( myPlaneCollection ); my3DExtActor->SetUnstructuredGrid(myVisualObj->GetUnstructuredGrid()); - Modified(); + if(IsShrunk()) + SetShrink(); + else + Modified(); } void diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 02eefc529..e28687008 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -142,7 +142,6 @@ SMESH_DeviceActor if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<Delete(); - myPlaneCollection->Delete(); myProperty->Delete(); diff --git a/src/OBJECT/SMESH_DeviceActor.h b/src/OBJECT/SMESH_DeviceActor.h index e2931d88f..a7c4dcb48 100644 --- a/src/OBJECT/SMESH_DeviceActor.h +++ b/src/OBJECT/SMESH_DeviceActor.h @@ -161,7 +161,8 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{ VTKViewer_PolyDataMapper *myMapper; TVisualObjPtr myVisualObj; - vtkPlaneCollection* myPlaneCollection; + vtkSmartPointer myPlaneCollection; + vtkProperty *myProperty; EReperesent myRepresentation;