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
(cherry picked from commit 79166510e9
)
This commit is contained in:
parent
e0a27b430a
commit
813fce2d2d
|
@ -379,7 +379,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