Salome HOME
First compilable version
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshPatternDlg.cxx
index d80523066d8100e775a643ed78675e88baefd75c..b7c9bcca4ff923b31abe112cdc945e15e4bfd4ce 100755 (executable)
 //=======================================================================
 SMESHGUI_MeshPatternDlg::SMESHGUI_MeshPatternDlg( SMESHGUI* theModule )
   : QDialog( SMESH::GetDesktop( theModule ) ),
+    SMESHGUI_Helper( theModule ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
     myBusy( false ),
@@ -413,20 +414,12 @@ bool SMESHGUI_MeshPatternDlg::isValid (const bool theMess)
 {
   if (isRefine())
   {
-    QString msg;
-    bool ok = true;
-    ok = myNode1->isValid( msg, theMess ) && ok;
-    if (myType == Type_3d)
-      ok = myNode2->isValid( msg, theMess ) && ok;
-    if( !ok ) {
-      if( theMess ) {
-        QString str( tr( "SMESH_INCORRECT_INPUT" ) );
-        if ( !msg.isEmpty() )
-          str += "\n" + msg;
-        SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
-      }
+    QList<QAbstractSpinBox*> aSpinBoxList;
+    aSpinBoxList << myNode1;
+    if( myType == Type_3d )
+      aSpinBoxList << myNode2;
+    if( !checkParameters( theMess, aSpinBoxList ) )
       return false;
-    }
   }
 
   QList<int> ids;