]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Using of QGuardedPtrs for SVTK_ViewWindow.
authorabd <abd@opencascade.com>
Wed, 23 Aug 2006 14:49:04 +0000 (14:49 +0000)
committerabd <abd@opencascade.com>
Wed, 23 Aug 2006 14:49:04 +0000 (14:49 +0000)
BUG 12118 and 13026

src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h

index 54a1264b01861306881a6574625b23e32b6d10e6..bff927aecbeb321dc5baa164d0040d4553afad5d 100644 (file)
@@ -210,7 +210,7 @@ void OrientedPlane::Init()
 
 OrientedPlane::~OrientedPlane()
 {
-  if (myViewWindow)
+  if ( !myViewWindow.isNull() )
     myViewWindow->RemoveActor(myActor);
 
   myActor->Delete();
@@ -577,9 +577,15 @@ void VisuGUI_ClippingDlg::ClickOnHelp()
   if (app)
     app->onHelpContextModule(myVisuGUI ? app->moduleName(myVisuGUI->moduleName()) : QString(""), aHelpFileName);
   else {
+               QString platform;
+#ifdef WIN32
+               platform = "winapplication";
+#else
+               platform = "application";
+#endif
     SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
                           QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
                           QObject::tr("BUT_OK"));
   }
 }
@@ -1126,6 +1132,7 @@ void VisuGUI_ClippingDlg::OnPreviewToggle (bool theIsToggled)
     VISU::RenderViewWindow(vw);
 }
 
+
 //=================================================================================
 // function : keyPressEvent()
 // purpose  :
@@ -1141,4 +1148,4 @@ void VisuGUI_ClippingDlg::keyPressEvent( QKeyEvent* e )
       e->accept();
       ClickOnHelp();
     }
-}
+}
\ No newline at end of file
index c076f34d785f956bf077ff096c555907bb70c859..be9dcb20f035f104cb94922bb322f5b363f4deac 100644 (file)
@@ -27,6 +27,7 @@
 
 // QT Includes
 #include <qdialog.h>
+#include <qguardedptr.h>
 #include <qtable.h>
 
 // VTK Includes
@@ -74,7 +75,7 @@ namespace VISU {
 //=================================================================================
 class OrientedPlane: public vtkPlane
 {
-  SVTK_ViewWindow* myViewWindow;
+  QGuardedPtr<SVTK_ViewWindow> myViewWindow;
   vtkDataSetMapper* myMapper;
 
 public: