From: eap Date: Thu, 3 Oct 2013 14:10:26 +0000 (+0000) Subject: ILMAB project. X-Git-Tag: BR_hydro_v_0_3_1~116 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ca070214292a3e9e478e610855aab5afb5783106;p=modules%2Fgeom.git ILMAB project. Fix dumping of SetStamp() --- diff --git a/src/GEOM/GEOM_Field.cxx b/src/GEOM/GEOM_Field.cxx index bfc485c60..6b9338d77 100644 --- a/src/GEOM/GEOM_Field.cxx +++ b/src/GEOM/GEOM_Field.cxx @@ -570,18 +570,11 @@ int GEOM_FieldStep::GetID() void GEOM_FieldStep::SetStamp(const int stamp) { - Handle(GEOM_Function) fun = GetLastFunction(); - if ( fun.IsNull() ) return; - if ( fun->GetType() == GEOM_Field::FUN_ADD_STEP ) - { - // it's creation of the step, dump is performed outside - GEOM_IField data( fun ); - data.SetStepStamp( stamp ); - } - else + if ( GetStamp() != stamp ) { // it's stamp modification: field.setStamp(step, stamp) - fun = AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_CHANGE_STEP_STAMP ); + Handle(GEOM_Function) fun = + AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_CHANGE_STEP_STAMP ); GEOM_IField data( fun ); data.SetStepStamp( stamp ); @@ -602,7 +595,7 @@ int GEOM_FieldStep::GetStamp() Handle(GEOM_Function) fun = getFunction( GEOM_Field::FUN_CHANGE_STEP_STAMP, this ); if ( !fun.IsNull() ) return GEOM_IField( fun ).GetStepStamp(); - return std::numeric_limits::max(); // very strange + return std::numeric_limits::max(); } //=======================================================================