From 4b2a1995c2c62718c2e1c63b7ee73b5ff658eebc Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 14 Jan 2009 14:13:13 +0000 Subject: [PATCH] 0019941: EDF 766 SMESH : Max length hypothesis do not show preestimated length at hyp edition if no shape selected --- src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index a3ac063a0..e2ca40fdc 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -577,10 +577,13 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const 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) ); - if ( !initHyp->_is_nil() && initHyp->HavePreestimatedLength() ) + noPreestimatedAtEdition = + ( initHyp->_is_nil() || !initHyp->HavePreestimatedLength() ); + if ( !noPreestimatedAtEdition ) h->SetPreestimatedLength( initHyp->GetPreestimatedLength() ); } @@ -592,7 +595,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const item.myName = tr("SMESH_USE_PREESTIMATED_LENGTH"); p.append( item ); QCheckBox* aQCheckBox = new QCheckBox(dlg()); - if ( h->HavePreestimatedLength() ) { + if ( !noPreestimatedAtEdition && h->HavePreestimatedLength() ) { aQCheckBox->setChecked( h->GetUsePreestimatedLength() ); connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ) ); } -- 2.39.2