]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHGUI/SMESHGUI_InitMeshDlg.cxx
Salome HOME
*** empty log message ***
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_InitMeshDlg.cxx
index 95545e4a26314b29db3878a6beae7d29f5514c37..f687dfef01f08a88922c85c76284d388bc4d35ef 100644 (file)
@@ -44,8 +44,8 @@
 //            The dialog will by default be modeless, unless you set 'modal' to
 //            TRUE to construct a modal dialog.
 //=================================================================================
-SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg( SMESHGUI* theModule )
-: SMESHGUI_Dialog( theModule, false, true )
+SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg()
+: SMESHGUI_Dialog( false, true )
 {
     setCaption(tr("SMESH_INIT_MESH"));
 
@@ -57,9 +57,10 @@ SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg( SMESHGUI* theModule )
     GroupC1->layout()->setSpacing(6);
     GroupC1->layout()->setMargin(11);
    
-    myMeshNameLabel = new QLabel(tr("SMESH_NAME"), GroupC1, "TextLabel_NameMesh");
+    new QLabel(tr("SMESH_NAME"), GroupC1, "TextLabel_NameMesh");
     GroupC1->addSpace(1);
     myMeshName = new QLineEdit(GroupC1, "LineEdit_NameMesh");
+    connect( myMeshName, SIGNAL( textChanged( const QString& ) ), this, SIGNAL( nameChanged( const QString& ) ) );
     
     createObject( tr("SMESH_OBJECT_GEOM"), GroupC1, GeomObj );
     createObject( tr("SMESH_OBJECT_HYPOTHESIS"), GroupC1, Hypo );
@@ -72,8 +73,6 @@ SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg( SMESHGUI* theModule )
     setObjectType( Algo, _smesh + ALGORITHM, -1 );
     
     main->addWidget( GroupC1 );
-    
-    updateControlState();
 }
 
 //=================================================================================
@@ -85,17 +84,6 @@ SMESHGUI_InitMeshDlg::~SMESHGUI_InitMeshDlg()
   // no need to delete child widgets, Qt does it all for us
 }
 
-//=================================================================================
-// function : updateControlState
-// purpose  :
-//=================================================================================
-void SMESHGUI_InitMeshDlg::updateControlState()
-{
-  bool isEnabled = !meshName().isEmpty() &&
-                   hasSelection( GeomObj ) && hasSelection( Hypo ) && hasSelection( Algo );
-  setButtonEnabled( isEnabled, OK | Apply );
-}
-
 //=================================================================================
 // function : meshName
 // purpose  :