From 02f3ff95299e98cbeb0f519a5dabdf10adb79997 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 13 Jul 2007 07:55:31 +0000 Subject: [PATCH] To use SALOME::GenericObjPtr template class instead of bare pointers --- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 6b9d3e50..8006fd48 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -166,7 +166,6 @@ VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent) connect( th, SIGNAL( clicked(int)), this, SLOT( setDefault(int) ) ); // default values - myCutPlanes = NULL; hasInit = false; X1 = 0; X2 = 0; Y1 = 0; Y2 = 0; @@ -178,8 +177,6 @@ VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent) VisuGUI_CutPlanesPane::~VisuGUI_CutPlanesPane() { deletePlanes(); - if (myCutPlanes) - myCutPlanes->Destroy(); if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow()) vf->Repaint(); } @@ -205,7 +202,7 @@ void VisuGUI_CutPlanesPane::initFromPrsObject (VISU::CutPlanes_i* thePrs) void VisuGUI_CutPlanesPane::createPlanes() { if (VISU::GetActiveViewWindow() == NULL) return; - if (myCutPlanes == NULL) return; + if (!myCutPlanes) return; if (myPreviewActor != 0) return; vtkAppendPolyData* aPolyData = myCutPlanes->GetSpecificPL()->GetAppendPolyData(); @@ -311,7 +308,7 @@ void VisuGUI_CutPlanesPane::setRotation (const double r1, const double r2) */ void VisuGUI_CutPlanesPane::DrawTable() { - if (myCutPlanes == NULL) return; + if (!myCutPlanes) return; if (!hasInit) return; int aNbRows = myPosTable->numRows(); @@ -441,7 +438,7 @@ void VisuGUI_CutPlanesPane::deletePlanes() void VisuGUI_CutPlanesPane::onRotation (double theValue) { - if (myCutPlanes == NULL) return; + if (!myCutPlanes) return; if (myPreviewCheck->isChecked()) { if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow()) { myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.); -- 2.39.2