Salome HOME
correction du choix d'une valeur relative pour le champ de pilotage
authorGerald Nicolas <D68518@claui2t3.der.edf.fr>
Thu, 27 Mar 2014 13:43:06 +0000 (14:43 +0100)
committerGerald Nicolas <D68518@claui2t3.der.edf.fr>
Thu, 27 Mar 2014 13:43:06 +0000 (14:43 +0100)
src/HOMARD/HomardDriver.cxx
src/HOMARDGUI/MonCreateHypothesis.cxx
src/HOMARD_I/HOMARD_Hypothesis_i.cxx

index 3081047682f039e7dd46364df269e8ab4b548f57..e72821155ca8c66eb4815a21efd605288c35e047 100644 (file)
@@ -588,7 +588,7 @@ void HomardDriver::TexteField( const std::string FieldName, const std::string Fi
   if ( UsCmpI == 1 )
   { saux = "INFINI" ; }
   if ( UsCmpI == 2 )
-  { saux = "V_RELATIVE" ; }
+  { saux = "RELATIF" ; }
   if ( saux != " " )
   {
     _Texte += "CCUsCmpI " + saux  + "\n" ;
index 77de52195e7d7c1a2e58cd2f9fecfa4b3a5a587a..f3be9366d01f019fc41372e338f5f44ce157d64d 100644 (file)
@@ -685,7 +685,8 @@ void MonCreateHypothesis::SetUCL2()
 void MonCreateHypothesis::SetUCInf()
 // ------------------------------------------------------------------------
 {
-  _UsCmpI = 1 ;
+  if ( TWCMP->rowCount() == 1 ) { _UsCmpI = 2 ; }
+  else                          { _UsCmpI = 1 ; }
   RBInf->setChecked(true);
 }
 // ------------------------------------------------------------------------
index 73c279e97fcca76e7f8756a0750535c6634472f0..c9850946a42dad14b9146d293905340a748853ed 100644 (file)
@@ -116,6 +116,7 @@ bool HOMARD_Hypothesis_i::Restore( const std::string& stream )
 void HOMARD_Hypothesis_i::SetUnifRefinUnRef( CORBA::Long TypeRaffDera )
 {
   ASSERT( myHomardHypothesis );
+  VERIFICATION( (TypeRaffDera==1) || (TypeRaffDera==-1) );
   int TypeRaff, TypeDera ;
   if ( TypeRaffDera == 1 )
   {
@@ -127,10 +128,6 @@ void HOMARD_Hypothesis_i::SetUnifRefinUnRef( CORBA::Long TypeRaffDera )
     TypeRaff = 0 ;
     TypeDera = 1 ;
   }
-  else
-  {
-    ASSERT( "TypeRaffDera should be 1 or -1" == 0 );
-  }
   myHomardHypothesis->SetAdapType( -1 );
   myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
 }
@@ -444,6 +441,7 @@ void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
 {
   MESSAGE ("Dans AddZone pour " << NomZone << " et TypeUse = " << TypeUse ) ;
   ASSERT( myHomardHypothesis );
+  VERIFICATION( (TypeUse==1) || (TypeUse==-1) );
   myHomardHypothesis->SetAdapType( 0 );
   int TypeRaff, TypeDera ;
   if ( TypeUse == 1 )
@@ -456,10 +454,6 @@ void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
     TypeRaff = myHomardHypothesis->GetRefinType() ;
     TypeDera = 1 ;
   }
-  else
-  {
-    ASSERT( "TypeUse should be 1 or -1" == 0 );
-  }
   myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
   char* NomHypo = GetName() ;
   return _gen_i->AssociateHypoZone(NomHypo, NomZone, TypeUse) ;