Salome HOME
First compilable version
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SmoothingDlg.cxx
index 1cab8d3f47eadf428db66ab14cf8efdbdde1370f..b5f14b00caa0e74084fab6b9cc0fcd97a1ad4129 100644 (file)
@@ -90,6 +90,7 @@
 //=================================================================================
 SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   : QDialog( SMESH::GetDesktop( theModule ) ),
+    SMESHGUI_Helper( theModule ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
     myFilterDlg(0),
@@ -826,17 +827,5 @@ void SMESHGUI_SmoothingDlg::setNodeFilters()
 //=================================================================================
 bool SMESHGUI_SmoothingDlg::isValid()
 {
-  QString msg;
-  bool ok = true;
-  ok = SpinBox_IterationLimit->isValid( msg, true ) && ok;
-  ok = SpinBox_AspectRatio->isValid( msg, true ) && ok;
-
-  if( !ok ) {
-    QString str( tr( "SMESH_INCORRECT_INPUT" ) );
-    if ( !msg.isEmpty() )
-      str += "\n" + msg;
-    SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
-    return false;
-  }
-  return true;
+  return checkParameters( true, 2, SpinBox_IterationLimit, SpinBox_AspectRatio );
 }