X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MultiEditDlg.cxx;h=325ccb484016e8ba7e0f27161989529f86849cc5;hb=bbd637f1323572d6977c72f404142bc5bfb70787;hp=42dbb6b8e5929327fe99cb4f8873f8241cef6e05;hpb=ddd20dd94358856385f639219bbdfbd1e14239d7;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 42dbb6b8e..325ccb484 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -297,7 +297,7 @@ QWidget* SMESHGUI_MultiEditDlg::createButtonFrame (QWidget* theParent) // name : SMESHGUI_MultiEditDlg::isValid // Purpose : Verify validity of input data //======================================================================= -bool SMESHGUI_MultiEditDlg::isValid (const bool /*theMess*/) const +bool SMESHGUI_MultiEditDlg::isValid (const bool /*theMess*/) { return (!myMesh->_is_nil() && (myListBox->count() > 0 || (myToAllChk->isChecked() && myActor))); @@ -1168,12 +1168,39 @@ SMESHGUI_UnionOfTrianglesDlg::~SMESHGUI_UnionOfTrianglesDlg() { } +bool SMESHGUI_UnionOfTrianglesDlg::isValid (const bool theMess) +{ + bool ok = SMESHGUI_MultiEditDlg::isValid( theMess ); + if( !ok ) + return false; + + QString msg; + ok = myMaxAngleSpin->isValid( msg, theMess ); + if( !ok ) { + if( theMess ) { + QString str( tr( "SMESH_INCORRECT_INPUT" ) ); + if ( !msg.isEmpty() ) + str += "\n" + msg; + SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str ); + } + return false; + } + + return ok; +} + bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, const SMESH::long_array& theIds) { SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor(); double aMaxAngle = myMaxAngleSpin->GetValue() * PI / 180.0; - return theEditor->TriToQuad(theIds, aCriterion, aMaxAngle); + bool ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle); + if( ok ) { + QStringList aParameters; + aParameters << myMaxAngleSpin->text(); + myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); + } + return ok; }