X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Hypotheses.cxx;h=f94f397852facfefa6fe66fa26232d4da6d9d3ac;hb=d4675122f5ede78f9c338c7b5d0e1f8380fc3c05;hp=49618fc8b47b5350702a9f25971a39f3fd5cc79d;hpb=2c607013a23bd4e7ba07e72e0c04dee2c1209cff;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index 49618fc8b..f94f39785 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -150,8 +150,10 @@ void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_ Dlg->show(); Dlg->resize( Dlg->minimumSizeHint() ); } - else + else { emit finished( QDialog::Accepted ); + delete myDlg; + } } QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame() @@ -330,18 +332,20 @@ bool SMESHGUI_GenericHypothesisCreator::getStdParamFromDlg( ListOfStdParams& par { SalomeApp_IntSpinBox* sb = ( SalomeApp_IntSpinBox* )( *anIt ); item.myValue = sb->value(); + item.myText = sb->text(); params.append( item ); } else if( (*anIt)->inherits( "SalomeApp_DoubleSpinBox" ) ) { SalomeApp_DoubleSpinBox* sb = ( SalomeApp_DoubleSpinBox* )( *anIt ); item.myValue = sb->value(); + item.myText = sb->text(); params.append( item ); } else if( (*anIt)->inherits( "QLineEdit" ) ) { QLineEdit* line = ( QLineEdit* )( *anIt ); - item.myValue = line->text(); + item.myValue = item.myText = line->text(); params.append( item ); } else if ( getParamFromCustomWidget( item, *anIt )) @@ -354,6 +358,16 @@ bool SMESHGUI_GenericHypothesisCreator::getStdParamFromDlg( ListOfStdParams& par return res; } +QString SMESHGUI_GenericHypothesisCreator::getVariableName(const char* methodName) const +{ + SMESH::SMESH_Hypothesis_var h = hypothesis(); + if ( !h->_is_nil() ) + { + CORBA::String_var aVaribaleName = h->GetVarParameter( methodName ); + return QString( aVaribaleName.in() ); + } + return QString(); +} QStringList SMESHGUI_GenericHypothesisCreator::getVariablesFromDlg() const {