Salome HOME
Editing hypothesis bug...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index cc1fc3d1d786004323eab3762be116c7407b35cd..487f8c97567ab8bb7a084dbc570f3eb1a8064ba0 100644 (file)
@@ -86,10 +86,10 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
   myIsCreate = true;
 
   // Create hypothesis/algorithm
-  if (isAlgo)
+  if (isAlgo) {
     SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
-  else
-  {
+  }
+  else {
     SMESH::SMESH_Hypothesis_var aHypothesis = 
       SMESH::CreateHypothesis( hypType(), theHypName, false );
     if( !editHypothesis( aHypothesis.in(), theHypName, theParent ) )
@@ -159,6 +159,7 @@ bool SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_
     Dlg->setType( type() );
     retrieveParams();
     Dlg->show();
+    Dlg->resize( Dlg->minimumSizeHint() );
     if ( !myEventLoop )
       myEventLoop = new QEventLoop( this );
     myEventLoop->exec(); // make myDlg not modal
@@ -383,6 +384,11 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_GenericHypothesisCreator::hypothesis() cons
   return myHypo;
 }
 
+void SMESHGUI_GenericHypothesisCreator::setShapeEntry( const QString& theEntry )
+{
+  myShapeEntry = theEntry;
+}
+
 //================================================================================
 /*!
  * \brief Return hypothesis containing initial parameters
@@ -492,9 +498,11 @@ void SMESHGUI_GenericHypothesisCreator::onReject()
 QString SMESHGUI_GenericHypothesisCreator::helpPage() const
 {
   QString aHypType = hypType();
-  QString aHelpFileName;
+  QString aHelpFileName = "";
   if ( aHypType == "LocalLength" )
     aHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor";
+  else if ( aHypType == "MaxLength" )
+    aHelpFileName = "a1d_meshing_hypo_page.html#max_length_anchor";
   else if ( aHypType == "Arithmetic1D")
     aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
   else if ( aHypType == "MaxElementArea")
@@ -520,9 +528,8 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const
   else if ( aHypType == "LayerDistribution")
     aHelpFileName = "radial_prism_algo_page.html";
   else if ( aHypType == "SegmentLengthAroundVertex")
-    aHelpFileName = "segments_around_vertex_algo.html";
-  else
-    aHelpFileName = "";
+    aHelpFileName = "segments_around_vertex_algo_page.html";
+    
   return aHelpFileName;
 }