// SALOME GUI includes
#include <SUIT_ResourceMgr.h>
+#include <SUIT_MessageBox.h>
// IDL includes
#include <SALOMEconfig.h>
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() );
h->SetMaxSize( params[1].myValue.toDouble() );
h->SetVarParameter( params[0].text(), "SetDeflection" );
h->SetDeflection( params[2].myValue.toDouble() );
- h->SetVarParameter( params[0].text(), "SetGrading" );
- h->SetGrading( params[3].myValue.toDouble() );
}
else if( hypType()=="AutomaticLength" )
{
if(!initVariableName( hyp, item, "SetDeflection" ))
item.myValue = h->GetDeflection();
p.append( item );
-
- item.myName = tr( "SMESH_GRADING1D_PARAM" );
- if(!initVariableName( hyp, item, "SetGrading" ))
- item.myValue = h->GetGrading();
- p.append( item );
}
else if( hypType()=="AutomaticLength" )
{
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 );
}
}
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 );
}
}
}
else if( hypType()=="Adaptive1D" )
{
- if (sb->objectName() == tr("SMESH_GRADING1D_PARAM"))
- sb->RangeStepAndValidator( 0.0, 2.0, 0.1, "length_precision" );
- else
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
else if( hypType().startsWith( "ViscousLayers" ))
{