Don't overwite env vars with settings.
Fixes: lp:1740022 * https://bugs.launchpad.net/kicad/+bug/1740022
This commit is contained in:
parent
8a35e58987
commit
182b134872
|
@ -641,6 +641,10 @@ void PGM_BASE::loadCommonSettings()
|
||||||
for( unsigned i = 0; i < entries.GetCount(); i++ )
|
for( unsigned i = 0; i < entries.GetCount(); i++ )
|
||||||
{
|
{
|
||||||
wxString val = m_common_settings->Read( entries[i], wxEmptyString );
|
wxString val = m_common_settings->Read( entries[i], wxEmptyString );
|
||||||
|
|
||||||
|
if( m_local_env_vars[ entries[i] ].GetDefinedExternally() )
|
||||||
|
continue;
|
||||||
|
|
||||||
m_local_env_vars[ entries[i] ] = ENV_VAR_ITEM( val, wxGetEnv( entries[i], NULL ) );
|
m_local_env_vars[ entries[i] ] = ENV_VAR_ITEM( val, wxGetEnv( entries[i], NULL ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,6 +672,9 @@ void PGM_BASE::SaveCommonSettings()
|
||||||
|
|
||||||
for( ENV_VAR_MAP_ITER it = m_local_env_vars.begin(); it != m_local_env_vars.end(); ++it )
|
for( ENV_VAR_MAP_ITER it = m_local_env_vars.begin(); it != m_local_env_vars.end(); ++it )
|
||||||
{
|
{
|
||||||
|
if( it->second.GetDefinedExternally() )
|
||||||
|
continue;
|
||||||
|
|
||||||
wxLogTrace( traceEnvVars, wxT( "Saving environment variable config entry %s as %s" ),
|
wxLogTrace( traceEnvVars, wxT( "Saving environment variable config entry %s as %s" ),
|
||||||
GetChars( it->first ), GetChars( it->second.GetValue() ) );
|
GetChars( it->first ), GetChars( it->second.GetValue() ) );
|
||||||
m_common_settings->Write( it->first, it->second.GetValue() );
|
m_common_settings->Write( it->first, it->second.GetValue() );
|
||||||
|
|
Loading…
Reference in New Issue