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
(cherry picked from commit 3cf424d929
)
This commit is contained in:
parent
c1ed2506f9
commit
2c0010fbcb
|
@ -436,15 +436,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;
|
||||
|
|
|
@ -338,6 +338,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