diff --git a/common/libraries/library_manager.cpp b/common/libraries/library_manager.cpp index 30e037fc57..8d734a1e4a 100644 --- a/common/libraries/library_manager.cpp +++ b/common/libraries/library_manager.cpp @@ -737,7 +737,7 @@ wxString LIBRARY_MANAGER::GetFullURI( const LIBRARY_TABLE_ROW* aRow, bool aSubstituted ) { if( aSubstituted ) - return ExpandEnvVarSubstitutions( aRow->URI(), nullptr ); + return ExpandEnvVarSubstitutions( aRow->URI(), &Pgm().GetSettingsManager().Prj() ); return aRow->URI(); } diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index cf784e4c16..b884bc4a25 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -1474,7 +1474,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnExport( wxCommandEvent& aEvent ) } path = ExpandTextVars( path, &textResolver ); - path = ExpandEnvVarSubstitutions( path, nullptr ); + path = ExpandEnvVarSubstitutions( path, &Prj() ); wxFileName outputFile = wxFileName::FileName( path ); wxString msg; diff --git a/pcbnew/dialogs/dialog_gen_footprint_position.cpp b/pcbnew/dialogs/dialog_gen_footprint_position.cpp index 87d2922775..b22ee1d988 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position.cpp +++ b/pcbnew/dialogs/dialog_gen_footprint_position.cpp @@ -302,7 +302,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles() wxString path = m_outputDirectory; path = ExpandTextVars( path, &textResolver ); - path = ExpandEnvVarSubstitutions( path, nullptr ); + path = ExpandEnvVarSubstitutions( path, &Prj() ); wxFileName outputDir = wxFileName::DirName( path ); wxString boardFilename = m_editFrame->GetBoard()->GetFileName(); @@ -419,7 +419,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles() wxString path = m_outputDirectory; path = ExpandTextVars( path, &textResolver ); - path = ExpandEnvVarSubstitutions( path, nullptr ); + path = ExpandEnvVarSubstitutions( path, &Prj() ); wxFileName outputDir = wxFileName::DirName( path ); wxString boardFilename = m_editFrame->GetBoard()->GetFileName(); diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 9c67515b7d..fff87191b0 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -326,7 +326,7 @@ void DIALOG_GENDRILL::genDrillAndMapFiles( bool aGenDrill, bool aGenMap, bool aG wxString path = m_plotOpts.GetOutputDirectory(); path = ExpandTextVars( path, &textResolver ); - path = ExpandEnvVarSubstitutions( path, nullptr ); + path = ExpandEnvVarSubstitutions( path, &Prj() ); wxFileName outputDir = wxFileName::DirName( path ); wxString boardFilename = m_board->GetFileName(); diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 2c3bfbc4cc..00a9cd4fe9 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -438,7 +438,7 @@ bool PLOT_CONTROLLER::OpenPlotfile( const wxString& aSuffix, PLOT_FORMAT aFormat wxString outputDirName = GetPlotOptions().GetOutputDirectory(); outputDirName = ExpandTextVars( outputDirName, &textResolver ); - outputDirName = ExpandEnvVarSubstitutions( outputDirName, nullptr ); + outputDirName = ExpandEnvVarSubstitutions( outputDirName, m_board->GetProject() ); wxFileName outputDir = wxFileName::DirName( outputDirName ); wxString boardFilename = m_board->GetFileName();