X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_StdHypothesisCreator.cxx;h=c481eea7e9b598017fce4bc1e545826bf002bce4;hb=b0647ff5ab38e3d44a7d6aaa8cdb1b12e12a5959;hp=891b2c0c86170a4fdc62f383ba55a3eb9d44303d;hpb=b0a908c0d20341651771d0249fb10882f54b2aad;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index 891b2c0c8..c481eea7e 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -47,6 +47,7 @@ // SALOME GUI includes #include +#include // IDL includes #include @@ -1265,8 +1266,15 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const idsWg->SetMainShapeEntry( aMainEntry ); idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry ); - idsWg->SetListOfIDs( h->GetFaces() ); - idsWg->showPreview( true ); + if ( idsWg->SetListOfIDs( h->GetFaces() )) + { + idsWg->showPreview( true ); + } + else + { + SUIT_MessageBox::warning( dlg(),tr( "SMESH_WRN_WARNING" ),tr( "BAD_FACES_WARNING" )); + idsWg->setEnabled( false ); + } customWidgets()->append ( idsWg ); } } @@ -1317,8 +1325,15 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const idsWg->SetMainShapeEntry( aMainEntry ); idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry ); - idsWg->SetListOfIDs( h->GetEdges() ); - idsWg->showPreview( true ); + if ( idsWg->SetListOfIDs( h->GetEdges() )) + { + idsWg->showPreview( true ); + } + else + { + SUIT_MessageBox::warning( dlg(),tr( "SMESH_WRN_WARNING" ),tr( "BAD_EDGES_WARNING" )); + idsWg->setEnabled( false ); + } customWidgets()->append ( idsWg ); } }