Common settings: fix: common environment vars: deleted vars were still in list.

When updating common environment variables list, the initial list was never
deleted. Therefore one could not remove an existing var.
The common environment variables list is now deleted before updating.
This commit is contained in:
jean-pierre charras 2020-09-14 14:44:54 +02:00
parent ff0a728753
commit d4461f6c53
1 changed files with 3 additions and 1 deletions

View File

@ -536,7 +536,9 @@ void PGM_BASE::SaveCommonSettings()
GetCommonSettings()->m_System.working_dir = wxGetCwd().ToStdString();
GetCommonSettings()->m_Env.show_warning_dialog = m_show_env_var_dialog;
// Save the local environment variables.
// Save the common environment variables.
GetCommonSettings()->m_Env.vars.clear();
for( auto& m_local_env_var : m_local_env_vars )
{
if( m_local_env_var.second.GetDefinedExternally() )