From 6e68fcd4978aadf5500a03d2899199889ed3efb9 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 19 Feb 2014 16:43:32 +0400 Subject: [PATCH] Fix problems with the OpenGL clipping planes. --- src/OBJECT/SMESH_Actor.cxx | 7 +++++-- src/OBJECT/SMESH_DeviceActor.cxx | 1 - src/OBJECT/SMESH_DeviceActor.h | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) 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; -- 2.30.2