eeschema: fix a crash when converting a old .sch file containing global labels.
This commit is contained in:
parent
6e1f075daa
commit
6b9c82c975
|
@ -346,10 +346,14 @@ void SCH_SHEET_PATH::UpdateAllScreenReferences() const
|
||||||
else if( item->Type() == SCH_GLOBAL_LABEL_T )
|
else if( item->Type() == SCH_GLOBAL_LABEL_T )
|
||||||
{
|
{
|
||||||
SCH_GLOBALLABEL* label = static_cast<SCH_GLOBALLABEL*>( item );
|
SCH_GLOBALLABEL* label = static_cast<SCH_GLOBALLABEL*>( item );
|
||||||
SCH_FIELD& intersheetRefs = label->GetFields()[0];
|
|
||||||
|
|
||||||
intersheetRefs.SetVisible( label->Schematic()->Settings().m_IntersheetRefsShow );
|
if( label->GetFields().size() > 0 ) // Can be not the case when reading a old .sch schematic
|
||||||
LastScreen()->Update( &intersheetRefs );
|
{
|
||||||
|
SCH_FIELD& intersheetRefs = label->GetFields()[0];
|
||||||
|
|
||||||
|
intersheetRefs.SetVisible( label->Schematic()->Settings().m_IntersheetRefsShow );
|
||||||
|
LastScreen()->Update( &intersheetRefs );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue