]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Profile object realization. OCC Viewer embeded into the profile dialog box.
authornds <nds@opencascade.com>
Tue, 26 Nov 2013 13:15:01 +0000 (13:15 +0000)
committernds <nds@opencascade.com>
Tue, 26 Nov 2013 13:15:01 +0000 (13:15 +0000)
src/HYDROCurveCreator/OCCViewer_ViewWidget.cxx
src/HYDROCurveCreator/OCCViewer_ViewWidget.h
src/HYDROGUI/HYDROGUI_ProfileDlg.cxx
src/HYDROGUI/HYDROGUI_ProfileDlg.h

index 791e2f2863b85eb31ed1b31ad45ee16fbd703881..fd242ac1f64cb7ccbaf49398ae06a7c8576b0cff 100644 (file)
@@ -1,8 +1,6 @@
 
 #include "OCCViewer_ViewWidget.h"
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <SUIT_Desktop.h>
 #include <SUIT_Session.h>
 #include <SUIT_ResourceMgr.h>
@@ -236,6 +234,10 @@ OCCViewer_ViewWidget::OCCViewer_ViewWidget(QWidget* parent)
 
 OCCViewer_ViewWidget::~OCCViewer_ViewWidget()
 {
+  delete myViewPort;
+
+  myAISContext.Nullify();
+  myV3dViewer.Nullify();
   #if OCC_VERSION_LARGE <= 0x06060000
     myV3dCollector.Nullify();
   #endif
index 494d16e14bc3a0abae696144e70591296d59cad2..1c4efc983cf0ac7790e38cb3c75d79317e190821 100644 (file)
@@ -2,6 +2,7 @@
 #define OCCVIEWER_VIEWWIDGET_H
 
 #include "CurveCreator_Macro.hxx"
+#include <Basics_OCCTVersion.hxx>
 
 #include <OCCViewer_ViewWindow.h>
 #include <QtxAction.h>
index a1ae6afd4b19857d1c4e55f2da35008f58bcb661..d813fb7abac05097a9c8f6f5b9bc4d431831693c 100644 (file)
@@ -48,9 +48,8 @@ HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QStr
   myEditorWidget = new CurveCreator_Widget( this, NULL );
   addWidget( myEditorWidget, 3 );
 
-  //OCCViewer_ViewWindow* aPreview = new OCCViewer_ViewWindow(
-  OCCViewer_ViewWidget* aViewWidget = new OCCViewer_ViewWidget( this );
-  addWidget( aViewWidget, 4 );
+  myViewWidget = new OCCViewer_ViewWidget( this );
+  addWidget( myViewWidget, 4 );
 
   //myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this );
   //addWidget( myAddElementBox, 2 );
index 266599303d8940e5cd06a5ee802063d37db31288..dd5f52223bcdf99e1992a755b4a9ee4a8d68aa29 100644 (file)
@@ -28,6 +28,7 @@
 class QGroupBox;
 class QLineEdit;
 class CurveCreator_Widget;
+class OCCViewer_ViewWidget;
 class CurveCreator_ICurve;
 class OCCViewer_Viewer;
 
@@ -67,6 +68,7 @@ private:
   QLineEdit*            myName;
   CurveCreator_Widget*  myEditorWidget;
   //QGroupBox*            myAddElementBox;
+  OCCViewer_ViewWidget* myViewWidget;
 };
 
 #endif