]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ProcessObject.cxx
Widgets updated
[cpPlugins.git] / lib / cpPlugins / Interface / ProcessObject.cxx
index ae4a1d3e4b2cf793c8eeab4ac1255691dbb589fd..f0d8d52886531aa72bcf80096c28d622a04cb925 100644 (file)
@@ -100,12 +100,29 @@ ExecConfigurationDialog( QWidget* parent )
 
 #ifdef cpPlugins_Interface_QT4
 
-  r = cpPlugins::Interface::ParametersQtDialog(
+  if( this->m_ParametersDialog == NULL )
+  {
+    this->m_ParametersDialog = new ParametersQtDialog( parent );
+    this->m_ParametersDialog->setTitle(
+      this->GetClassName( ) + std::string( " basic configuration" )
+      );
+    this->m_ParametersDialog->setParameters( this->m_Parameters );
+
+  } // fi
+
+  if( !( this->m_ParametersDialog->IsModal( ) ) )
+  {
+    this->m_ParametersDialog->show( );
+    r = true;
+  }
+  else
+    r = ( this->m_ParametersDialog->exec( ) == 1 );
+  /*
+    r = cpPlugins::Interface::ParametersQtDialog(
     this->m_Parameters,
     this->GetClassName( ) + std::string( " basic configuration" ),
     parent
     );
-  /*
     if( r )
     // TODO: !!! this->m_Parameters = parameters;
     */
@@ -120,7 +137,8 @@ cpPlugins::Interface::ProcessObject::
 ProcessObject( )
   : Superclass( ),
     m_ITKObject( NULL ),
-    m_VTKObject( NULL )
+    m_VTKObject( NULL ),
+    m_ParametersDialog( NULL )
 {
   this->m_Parameters = TParameters::New( );
 }
@@ -129,6 +147,8 @@ ProcessObject( )
 cpPlugins::Interface::ProcessObject::
 ~ProcessObject( )
 {
+  if( this->m_ParametersDialog == NULL )
+    delete this->m_ParametersDialog;
 }
 
 // -------------------------------------------------------------------------