Make sure var overrides get synced to board properties.
Also allow the board properties to override title-block properties. Fixes https://gitlab.com/kicad/code/kicad/-/issues/17863
This commit is contained in:
parent
ac59a65d8d
commit
3cf424d929
|
@ -458,15 +458,15 @@ bool BOARD::ResolveTextVar( wxString* token, int aDepth ) const
|
|||
|
||||
wxString var = *token;
|
||||
|
||||
if( GetTitleBlock().TextVarResolver( token, m_project ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( m_properties.count( var ) )
|
||||
if( m_properties.count( var ) )
|
||||
{
|
||||
*token = m_properties.at( var );
|
||||
return true;
|
||||
}
|
||||
else if( GetTitleBlock().TextVarResolver( token, m_project ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if( GetProject() && GetProject()->TextVarResolver( token ) )
|
||||
return true;
|
||||
|
|
|
@ -547,6 +547,7 @@ int PCBNEW_JOBS_HANDLER::JobExportPdf( JOB* aJob )
|
|||
BOARD* brd = LoadBoard( aPdfJob->m_filename, true );
|
||||
loadOverrideDrawingSheet( brd, aPdfJob->m_drawingSheet );
|
||||
brd->GetProject()->ApplyTextVars( aJob->GetVarOverrides() );
|
||||
brd->SynchronizeProperties();
|
||||
|
||||
if( aPdfJob->m_outputFile.IsEmpty() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue