X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FParameters.cxx;h=e584b5e5d36cbd5d7f2719fe46f9ffb481f77302;hb=f4aeff15ebb41183d4b89f41b29ec26043848722;hp=4a05b4fb4763654783d4318d78233306fb739069;hpb=9c75dcecf566cc567583caf4687ce523a2af586d;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Parameters.cxx b/lib/cpPlugins/Interface/Parameters.cxx index 4a05b4f..e584b5e 100644 --- a/lib/cpPlugins/Interface/Parameters.cxx +++ b/lib/cpPlugins/Interface/Parameters.cxx @@ -163,12 +163,12 @@ cpPlugins_Parameters_Has( Choices ); // ------------------------------------------------------------------------- cpPlugins::Interface::Parameters:: TString cpPlugins::Interface::Parameters:: -GetString( const TString& name ) const +GetString( const TString& name, bool force ) const { TParameters::const_iterator i = this->m_Parameters.find( name ); if( i != this->m_Parameters.end( ) ) { - if( i->second.first == Self::String ) + if( i->second.first == Self::String || !force ) return( i->second.second.second ); } // fi @@ -364,12 +364,12 @@ GetSelectedChoice( const TString& name ) const // ------------------------------------------------------------------------- void cpPlugins::Interface::Parameters:: -SetString( const TString& name, const TString& v ) +SetString( const TString& name, const TString& v, bool force ) { TParameters::iterator i = this->m_Parameters.find( name ); if( i == this->m_Parameters.end( ) ) return; - if( i->second.first != Self::String ) + if( i->second.first != Self::String && force ) return; i->second.second.second = v; this->Modified( );