X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Hypothesis_i.cxx;h=c1b5c956a72edb85ca224c2fe54e358c5fced769;hb=cdff506eafef30d65244a4b71d5198c404a4251b;hp=fd66bcfd47920f537679261b23e2e04b92ea34de;hpb=f89c0586c1d18c14cf772fa64a7fe6cc680376d1;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Hypothesis_i.cxx b/src/SMESH_I/SMESH_Hypothesis_i.cxx index fd66bcfd4..c1b5c956a 100644 --- a/src/SMESH_I/SMESH_Hypothesis_i.cxx +++ b/src/SMESH_I/SMESH_Hypothesis_i.cxx @@ -153,7 +153,10 @@ void SMESH_Hypothesis_i::SetVarParameter (const char* theParameter, { if ( SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen() ) { - gen->UpdateParameters( CORBA::Object_var( _this() ).in(), theParameter ); + SMESH::SMESH_Hypothesis_var varHolder; + if ( myHolder->_is_nil() ) varHolder = _this(); + else varHolder = myHolder; + gen->UpdateParameters( varHolder, theParameter ); const std::vector< std::string >& pars = gen->GetLastParameters(); if ( !pars.empty() ) @@ -186,6 +189,20 @@ char* SMESH_Hypothesis_i::GetVarParameter (const char* theMethod) return CORBA::string_dup(""); } +//================================================================================ +/*! + * \brief Store a hypothesis wrapping this not published one. + * + * This hyp, which has no own parameters but is published, is used to store variables + * defining parameters of this hypothesis. + */ +//================================================================================ + +void SMESH_Hypothesis_i::SetHolderHypothesis(const SMESH::SMESH_Hypothesis_ptr hyp) +{ + myHolder = SMESH::SMESH_Hypothesis::_duplicate( hyp ); +} + //================================================================================ /*! * \brief Restore myMethod2VarParams by parameters stored in an old study