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;
|
wxString var = *token;
|
||||||
|
|
||||||
if( GetTitleBlock().TextVarResolver( token, m_project ) )
|
if( m_properties.count( var ) )
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if( m_properties.count( var ) )
|
|
||||||
{
|
{
|
||||||
*token = m_properties.at( var );
|
*token = m_properties.at( var );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if( GetTitleBlock().TextVarResolver( token, m_project ) )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if( GetProject() && GetProject()->TextVarResolver( token ) )
|
if( GetProject() && GetProject()->TextVarResolver( token ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -547,6 +547,7 @@ int PCBNEW_JOBS_HANDLER::JobExportPdf( JOB* aJob )
|
||||||
BOARD* brd = LoadBoard( aPdfJob->m_filename, true );
|
BOARD* brd = LoadBoard( aPdfJob->m_filename, true );
|
||||||
loadOverrideDrawingSheet( brd, aPdfJob->m_drawingSheet );
|
loadOverrideDrawingSheet( brd, aPdfJob->m_drawingSheet );
|
||||||
brd->GetProject()->ApplyTextVars( aJob->GetVarOverrides() );
|
brd->GetProject()->ApplyTextVars( aJob->GetVarOverrides() );
|
||||||
|
brd->SynchronizeProperties();
|
||||||
|
|
||||||
if( aPdfJob->m_outputFile.IsEmpty() )
|
if( aPdfJob->m_outputFile.IsEmpty() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue