X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_StdHypothesisCreator.cxx;h=e912e113d1d337b55483d397ac80483c2b4aff4a;hb=9d134b21b1ed187851322a6b5feef3bee83b6583;hp=aa8e2864ef84c8b55c0d4e7cc61cea855b33d3b6;hpb=5b8d7b95e3fcc5f0b57e351ef9bcbdc5933864b9;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index aa8e2864e..e912e113d 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -47,6 +47,7 @@ // SALOME GUI includes #include +#include // IDL includes #include @@ -407,7 +408,7 @@ bool StdMeshersGUI_StdHypothesisCreator::checkParams( QString& msg ) const srcV = w1->GetValue(); tgtV = w2->GetValue(); ok = (( srcV.isEmpty() && tgtV.isEmpty() ) || - ( !srcV.isEmpty() && !tgtV.isEmpty() && srcV != tgtV )); + ( !srcV.isEmpty() && !tgtV.isEmpty() /*&& srcV != tgtV*/ )); if ( !ok ) { w1->SetObject( CORBA::Object::_nil() ); w2->SetObject( CORBA::Object::_nil() ); @@ -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 ); } }