X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_RevolutionDlg.cxx;fp=src%2FSMESHGUI%2FSMESHGUI_RevolutionDlg.cxx;h=811ed074880b4f22afd5ae73de99da0baa73cd40;hb=44a2277a1a9b53dd1ca7cec27fab991882212c00;hp=484989dfd1e4e8c321906ebe5d04139281b39340;hpb=6d66c9caa86eca3fd9a3131fef75630408f13876;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 484989dfd..811ed0748 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -89,6 +89,7 @@ //================================================================================= SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule ) : QDialog( SMESH::GetDesktop( theModule ) ), + SMESHGUI_Helper( theModule ), mySMESHGUI( theModule ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), myVectorDefinition(NONE_SELECT), @@ -1181,24 +1182,8 @@ void SMESHGUI_RevolutionDlg::setFilters() //================================================================================= bool SMESHGUI_RevolutionDlg::isValid() { - QString msg; - bool ok = true; - ok = SpinBox_X->isValid( msg, true ) && ok; - ok = SpinBox_Y->isValid( msg, true ) && ok; - ok = SpinBox_Z->isValid( msg, true ) && ok; - ok = SpinBox_DX->isValid( msg, true ) && ok; - ok = SpinBox_DY->isValid( msg, true ) && ok; - ok = SpinBox_DZ->isValid( msg, true ) && ok; - ok = SpinBox_Angle->isValid( msg, true ) && ok; - ok = SpinBox_NbSteps->isValid( msg, true ) && ok; - ok = SpinBox_Tolerance->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, 9, + SpinBox_X, SpinBox_Y, SpinBox_Z, + SpinBox_DX, SpinBox_DY, SpinBox_DZ, + SpinBox_Angle, SpinBox_NbSteps, SpinBox_Tolerance ); }