Fully expand all text variables in 3d output
We were doing half of the job but we need to get the board variables as well Fixes https://gitlab.com/kicad/code/kicad/issues/17768
This commit is contained in:
parent
f088b0d18a
commit
79166510e9
|
@ -361,7 +361,16 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
wxString path = m_outputFileName->GetValue();
|
||||
m_parent->SetLastPath( LAST_PATH_STEP, path );
|
||||
|
||||
// Build the absolute path of current output directory to preselect it in the file browser.
|
||||
std::function<bool( wxString* )> textResolver =
|
||||
[&]( wxString* token ) -> bool
|
||||
{
|
||||
return m_parent->GetBoard()->ResolveTextVar( token, 0 );
|
||||
};
|
||||
|
||||
path = ExpandTextVars( path, &textResolver );
|
||||
path = ExpandEnvVarSubstitutions( path, &Prj() );
|
||||
path = Prj().AbsolutePath( path );
|
||||
|
||||
if( path.IsEmpty() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue