Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VISUGUI / VisuGUI_IsoSurfacesDlg.cxx
index 215039381179c189102755bc65f82daa60331051..34d170b91a3ed5ac73e19d431a23fc2e11158397 100644 (file)
@@ -27,8 +27,9 @@
 //  $Header$
 
 #include "VisuGUI_IsoSurfacesDlg.h"
+
 #include "VisuGUI.h"
-//#include "VisuGUI_Selection.h"
+#include "VisuGUI_Tools.h"
 
 #include "SalomeApp_Application.h"
 
@@ -160,8 +161,8 @@ bool VisuGUI_IsoSurfPane::check()
 /*!
   Constructor
 */
-VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (QWidget* parent)
-     : QDialog(parent, "VisuGUI_IsoSurfacesDlg", true,
+VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (SalomeApp_Module* theModule)
+     : QDialog(VISU::GetDesktop(theModule), "VisuGUI_IsoSurfacesDlg", true,
                WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
   setCaption(tr("DEFINE_ISOSURFACES"));
@@ -211,5 +212,14 @@ VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (QWidget* parent)
 void VisuGUI_IsoSurfacesDlg::accept()
 {
   if (myIsoPane->check() && myScalarPane->check())
-    QDialog::accept();
+    {
+      myScalarPane->deletePreview();
+      QDialog::accept();
+    }
+}
+
+void VisuGUI_IsoSurfacesDlg::reject()
+{
+  myScalarPane->deletePreview();
+  QDialog::reject();
 }