]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Parameters.cxx
More on graph editor
[cpPlugins.git] / lib / cpPlugins / Interface / Parameters.cxx
index 4a05b4fb4763654783d4318d78233306fb739069..e584b5e5d36cbd5d7f2719fe46f9ffb481f77302 100644 (file)
@@ -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( );