From b8728d4b022ae38ab5cfa063ec6fe59c51226210 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 14 Jan 2009 09:25:46 +0000 Subject: [PATCH] 0019941: EDF 766 SMESH : Max length hypothesis set a right preestimated length to edited "Max Size" hypothesis --- src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index 5fc050ece..a3ac063a0 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -572,10 +572,17 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const item.myValue = h->GetPrecision(); p.append( item ); } - if( hypType()=="MaxLength" ) + else if( hypType()=="MaxLength" ) { StdMeshers::StdMeshers_MaxLength_var h = StdMeshers::StdMeshers_MaxLength::_narrow( hyp ); + // try to set a right preestimated length to edited hypothesis + if ( !isCreation() ) { + StdMeshers::StdMeshers_MaxLength_var initHyp = + StdMeshers::StdMeshers_MaxLength::_narrow( initParamsHypothesis(true) ); + if ( !initHyp->_is_nil() && initHyp->HavePreestimatedLength() ) + h->SetPreestimatedLength( initHyp->GetPreestimatedLength() ); + } item.myName = tr("SMESH_LOCAL_LENGTH_PARAM"); item.myValue = h->GetLength(); -- 2.39.2