Fix relative step file export

Forgot to set the project relative path, and the library search path

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13696
This commit is contained in:
Marek Roszko 2023-01-29 22:19:37 -05:00
parent 5163cb6976
commit e928d72c3b
1 changed files with 3 additions and 1 deletions

View File

@ -123,6 +123,8 @@ EXPORTER_STEP::EXPORTER_STEP( BOARD* aBoard, const EXPORTER_STEP_PARAMS& aParams
m_resolver = std::make_unique<FILENAME_RESOLVER>();
m_resolver->Set3DConfigDir( wxT( "" ) );
// needed to add the project to the search stack
m_resolver->SetProject( aBoard->GetProject() );
m_resolver->SetProgramBase( &Pgm() );
}
@ -188,7 +190,7 @@ bool EXPORTER_STEP::composePCB( FOOTPRINT* aFootprint, VECTOR2D aOrigin )
continue;
std::vector<wxString> searchedPaths;
wxString mname = m_resolver->ResolvePath( fp_model.m_Filename, wxEmptyString );
wxString mname = m_resolver->ResolvePath( fp_model.m_Filename, footprintBasePath );
if( !wxFileName::FileExists( mname ) )