Browse Source

Avoid resolving text vars without screen

We need to keep the screen blank while initially loading a sheet before
the hierarchy is developed.  Avoid resolving text variables during this
process

Fixes https://gitlab.com/kicad/code/kicad/issues/11000

(cherry picked from commit 63b06af6b1)
7.0
Seth Hillbrand 4 years ago
parent
commit
eb06ecab10
  1. 4
      eeschema/sch_sheet.cpp

4
eeschema/sch_sheet.cpp

@ -248,7 +248,9 @@ bool SCH_SHEET::ResolveTextVar( wxString* token, int aDepth ) const
PROJECT *project = &Schematic()->Prj();
if( m_screen->GetTitleBlock().TextVarResolver( token, project ) )
// We cannot resolve text variables initially on load as we need to first load the screen and
// then parse the hierarchy. So skip the resolution if the screen isn't set yet
if( m_screen && m_screen->GetTitleBlock().TextVarResolver( token, project ) )
{
return true;
}

Loading…
Cancel
Save