+ else if( hypType()=="MaxLength" )
+ {
+ StdMeshers::StdMeshers_MaxLength_var h =
+ StdMeshers::StdMeshers_MaxLength::_narrow( hyp );
+ // try to set a right preestimated length to edited hypothesis
+ bool noPreestimatedAtEdition = false;
+ if ( !isCreation() ) {
+ StdMeshers::StdMeshers_MaxLength_var initHyp =
+ StdMeshers::StdMeshers_MaxLength::_narrow( initParamsHypothesis(true) );
+ noPreestimatedAtEdition =
+ ( initHyp->_is_nil() || !initHyp->HavePreestimatedLength() );
+ if ( !noPreestimatedAtEdition )
+ h->SetPreestimatedLength( initHyp->GetPreestimatedLength() );
+ }
+
+ item.myName = tr("SMESH_LOCAL_LENGTH_PARAM");
+ item.myValue = h->GetLength();
+ p.append( item );
+ customWidgets()->append(0);
+
+ item.myName = tr("SMESH_USE_PREESTIMATED_LENGTH");
+ p.append( item );
+ QCheckBox* aQCheckBox = new QCheckBox(dlg());
+ if ( !noPreestimatedAtEdition && h->HavePreestimatedLength() ) {
+ aQCheckBox->setChecked( h->GetUsePreestimatedLength() );
+ connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ) );
+ }
+ else {
+ aQCheckBox->setChecked( false );
+ aQCheckBox->setEnabled( false );
+ }
+ customWidgets()->append( aQCheckBox );
+ }