Salome HOME
Fix for NPAL17873.
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI_StdHypothesisCreator.cxx
index 13f87e56038c669fe198655c13f553e1b8f18a89..d428e3644079f7ef781b7dfc4f89c835212db921 100644 (file)
@@ -388,6 +388,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
        StdMeshers::StdMeshers_LocalLength::_narrow( hypothesis() );
 
       h->SetLength( params[0].myValue.toDouble() );
+      h->SetPrecision( params[1].myValue.toDouble() );
     }
     else if( hypType()=="SegmentLengthAroundVertex" )
     {
@@ -535,6 +536,9 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     item.myName = tr("SMESH_LOCAL_LENGTH_PARAM");
     item.myValue = h->GetLength();
     p.append( item );
+    item.myName = tr("SMESH_LOCAL_LENGTH_PRECISION");
+    item.myValue = h->GetPrecision();
+    p.append( item );
   }
   else if( hypType()=="SegmentLengthAroundVertex" )
   {
@@ -703,13 +707,15 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
   * \param int - parameter index
  */
 //================================================================================
-
 void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget( QWidget* w, const int ) const
-{
+{ 
   SMESHGUI_SpinBox* sb = w->inherits( "SMESHGUI_SpinBox" ) ? ( SMESHGUI_SpinBox* )w : 0;
   if( hypType()=="LocalLength" &&  sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    if (sb->name() == tr("SMESH_LOCAL_LENGTH_PARAM"))
+      sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    else if (sb->name() == tr("SMESH_LOCAL_LENGTH_PRECISION"))
+      sb->RangeStepAndValidator( 0.0, 1.0, 0.05, 6 );
   }
   else if( hypType()=="Arithmetic1D" && sb )
   {