X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI.cxx;h=fa48527deebd38095f1681559cb3dfb86c824536;hb=1d0ad233cfb9576030f41a0d04ab46f33eaab17e;hp=aa7bd34bd3bdf86de5c09256dbb13783696bb87f;hpb=c38c10811a065cf5b13e8807ed71864d92ca7d80;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI.cxx b/src/StdMeshersGUI/StdMeshersGUI.cxx index aa7bd34bd..fa48527de 100644 --- a/src/StdMeshersGUI/StdMeshersGUI.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI.cxx @@ -40,6 +40,8 @@ #include "SUIT_Desktop.h" #include "SUIT_ResourceMgr.h" +#include + #include #include "utilities.h" @@ -97,9 +99,16 @@ void StdMeshersGUI_HypothesisCreator::CreateHypothesis else { if ( StdMeshersGUI_Parameters::HasParameters( myHypType )) - // Show Dialog for hypothesis creation - //StdMeshersGUI_CreateStdHypothesisDlg *aDlg = - new StdMeshersGUI_CreateStdHypothesisDlg(myHypType, parent, ""); + { + // Show Dialog for hypothesis creation + StdMeshersGUI_CreateStdHypothesisDlg *aDlg = + new StdMeshersGUI_CreateStdHypothesisDlg(myHypType, parent, ""); + /* Move widget on the botton right corner of main widget */ +// int x, y ; +// mySMESHGUI->DefineDlgPosition( aDlg, x, y ) ; +// aDlg->move( x, y ) ; + aDlg->exec() ; /* displays Dialog */ + } else SMESH::CreateHypothesis(myHypType, aHypName, isAlgo); // without GUI } @@ -121,8 +130,18 @@ void StdMeshersGUI_HypothesisCreator::EditHypothesis StdMeshersGUI_Parameters::GetParameters( theHyp, paramList ); bool modified = false; - if ( SMESHGUI_aParameterDlg::Parameters( paramList, QObject::tr("SMESH_VALUE")) ) - modified = StdMeshersGUI_Parameters::SetParameters( theHyp, paramList ); + if ( SMESHGUI_aParameterDlg::Parameters( SMESHGUI::GetSMESHGUI(), paramList, QObject::tr("SMESH_VALUE")) ) + { + try + { + modified = StdMeshersGUI_Parameters::SetParameters( theHyp, paramList ); + } + catch (const SALOME::SALOME_Exception& S_ex) + { + SalomeApp_Tools::QtCatchCorbaException(S_ex); + return; + } + } if ( modified ) { //set new Attribute Comment for hypothesis which parameters were modified