Salome HOME
Refactoring
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI_NbSegmentsCreator.cxx
index 50906a0cad09c12727115067f295b1411158df23..1d51257686912f8d557196c164f3148b4d8b7809 100644 (file)
@@ -80,17 +80,17 @@ StdMeshersGUI_NbSegmentsCreator::~StdMeshersGUI_NbSegmentsCreator()
 {
 }
 
-bool StdMeshersGUI_NbSegmentsCreator::checkParams( QString& msg ) const
+bool StdMeshersGUI_NbSegmentsCreator::checkParams( QString& msg, QStringList& absentParams ) const
 {
-  if( !SMESHGUI_GenericHypothesisCreator::checkParams( msg ) )
+  if( !SMESHGUI_GenericHypothesisCreator::checkParams( msg, absentParams ) )
     return false;
   NbSegmentsHypothesisData data_old, data_new;
   readParamsFromHypo( data_old );
   readParamsFromWidgets( data_new );
   bool res = storeParamsToHypo( data_new );
   storeParamsToHypo( data_old );
-  res = myNbSeg->isValid( msg, true ) && res;
-  res = myScale->isValid( msg, true ) && res;
+  res = myNbSeg->isValid( msg, absentParams, true ) && res;
+  res = myScale->isValid( msg, absentParams, true ) && res;
   return res;
 }
 
@@ -305,16 +305,16 @@ bool StdMeshersGUI_NbSegmentsCreator::readParamsFromHypo( NbSegmentsHypothesisDa
 
   h_data.myNbSeg = (int) h->GetNumberOfSegments();
   
-  SMESH::ListOfParameters_var aParameters = h->GetLastParameters();
+  SALOME::StringArray* aParameters = h->GetParameters();
 
-  h_data.myNbSegVarName  = (aParameters->length() > 0) ? QString(aParameters[0].in()) : QString("");
+  h_data.myNbSegVarName  = (aParameters->length() > 0) ? QString(aParameters->operator[](0)) : QString("");
 
   int distr = (int) h->GetDistrType();
   h_data.myDistrType = distr;
   h_data.myScale = distr==1 ? h->GetScaleFactor() : 1.0;
   
   if(distr==1){
-    h_data.myScaleVarName  = (aParameters->length() > 1) ? QString(aParameters[1].in()) : QString("");
+    h_data.myScaleVarName  = (aParameters->length() > 1) ? QString(aParameters->operator[](1)) : QString("");
   }
   else 
     h_data.myScaleVarName = QString("");
@@ -379,7 +379,9 @@ bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothe
     //the function will be checked with old conversion mode, so that it may occurs
     //unexpected errors for user
 
-    h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
+    /* ouv: temporarily disabled
+    h->SetParameters(aVariablesList.join(":").toLatin1().constData());
+    */
   }
   catch(const SALOME::SALOME_Exception& ex)
   {