Preserve the externally defined variables in the configure paths dialog
Previously the variables that were defined externally weren't being
readded to the variable map, so they would not appear in the dialog
the next time.
(Cherry-picked from fedc6519cd
)
This commit is contained in:
parent
475385d876
commit
8ee1a7f67f
|
@ -221,14 +221,17 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow()
|
|||
|
||||
for( int row = 0; row < m_EnvVars->GetNumberRows(); ++row )
|
||||
{
|
||||
wxString name = m_EnvVars->GetCellValue( row, EV_NAME_COL );
|
||||
wxString path = m_EnvVars->GetCellValue( row, EV_PATH_COL );
|
||||
wxString external = m_EnvVars->GetCellValue( row, EV_FLAG_COL );
|
||||
wxString name = m_EnvVars->GetCellValue( row, EV_NAME_COL );
|
||||
wxString path = m_EnvVars->GetCellValue( row, EV_PATH_COL );
|
||||
wxString external = m_EnvVars->GetCellValue( row, EV_FLAG_COL );
|
||||
ENV_VAR_ITEM var( path );
|
||||
|
||||
if( external.Length() )
|
||||
continue;
|
||||
|
||||
if( name.IsEmpty() )
|
||||
{
|
||||
// Don't check for consistency on external variables, just use them as-is
|
||||
var.SetDefinedExternally( true );
|
||||
}
|
||||
else if( name.IsEmpty() )
|
||||
{
|
||||
m_errorGrid = m_EnvVars;
|
||||
m_errorRow = row;
|
||||
|
@ -245,7 +248,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow()
|
|||
return false;
|
||||
}
|
||||
|
||||
envVarMap[ name ] = ENV_VAR_ITEM( path );
|
||||
envVarMap[ name ] = var;
|
||||
}
|
||||
|
||||
Pgm().SetLocalEnvVariables( envVarMap );
|
||||
|
|
Loading…
Reference in New Issue