Salome HOME
PAL10406. Enable myNodes when a pattern is loaded. UpdatePreview() when elements...
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI.cxx
index 93322c3e76b3255dd93e481f1e3bd45ddf2d953b..fa48527deebd38095f1681559cb3dfb86c824536 100644 (file)
@@ -40,6 +40,8 @@
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
 
+#include <SalomeApp_Tools.h>
+
 #include <qobject.h>
 
 #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
   }
@@ -122,7 +131,17 @@ void StdMeshersGUI_HypothesisCreator::EditHypothesis
 
   bool modified = false;
   if ( SMESHGUI_aParameterDlg::Parameters( SMESHGUI::GetSMESHGUI(), paramList, QObject::tr("SMESH_VALUE")) )
-    modified = StdMeshersGUI_Parameters::SetParameters( theHyp, paramList );
+  {
+    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