]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ParametersQtDialog.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / ParametersQtDialog.cxx
index 456704b0300f2c1fc8e0613ce8307139737de05b..32cd8c4bea84b706d1c7f7d83045a39f2831874c 100644 (file)
@@ -65,6 +65,7 @@ int cpPlugins::Interface::ParametersQtDialog::
 exec( )
 {
   this->_updateWidgets( );
+  this->updateView( );
 
   int ret = this->QDialog::exec( );
   if( ret == 1 )
@@ -268,6 +269,26 @@ updateView( )
   } // rof
 }
 
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::ParametersQtDialog::
+_addButtons( )
+{
+  // Add buttons
+  this->m_Buttons = new QDialogButtonBox(
+    QDialogButtonBox::Ok | QDialogButtonBox::Cancel
+    );
+  this->connect(
+    this->m_Buttons, SIGNAL( accepted( ) ), this, SLOT( accept( ) )
+    );
+  this->connect(
+    this->m_Buttons, SIGNAL( rejected( ) ), this, SLOT( reject( ) )
+    );
+  this->m_ToolsLayout->addWidget( this->m_Buttons );
+
+  this->updateView( );
+  this->m_WidgetsUpdated = true;
+}
+
 // -------------------------------------------------------------------------
 void cpPlugins::Interface::ParametersQtDialog::
 _updateWidgets( )
@@ -512,21 +533,8 @@ _updateWidgets( )
 
   } // rof
 
-  // Add buttons
-  this->m_Buttons = new QDialogButtonBox(
-    QDialogButtonBox::Ok | QDialogButtonBox::Cancel
-    );
-  this->connect(
-    this->m_Buttons, SIGNAL( accepted( ) ), this, SLOT( accept( ) )
-    );
-  this->connect(
-    this->m_Buttons, SIGNAL( rejected( ) ), this, SLOT( reject( ) )
-    );
-  this->m_ToolsLayout->addWidget( this->m_Buttons );
-
   // Update values
-  this->updateView( );
-  this->m_WidgetsUpdated = true;
+  this->_addButtons( );
 }
 
 // -------------------------------------------------------------------------