Read footprint info cache when fpinfo requested via kiway.
This commit is contained in:
parent
c1cf7c32c3
commit
d52429fc3c
|
@ -142,7 +142,15 @@ static FOOTPRINT_LIST* get_instance_from_id( KIWAY& aKiway, int aId )
|
|||
|
||||
FOOTPRINT_LIST* FOOTPRINT_LIST::GetInstance( KIWAY& aKiway )
|
||||
{
|
||||
return get_instance_from_id( aKiway, KIFACE_FOOTPRINT_LIST );
|
||||
FOOTPRINT_LIST* footprintInfo = get_instance_from_id( aKiway, KIFACE_FOOTPRINT_LIST );
|
||||
|
||||
if( !footprintInfo->GetCount() )
|
||||
{
|
||||
wxTextFile footprintInfoCache( aKiway.Prj().GetProjectPath() + "fp-info-cache" );
|
||||
footprintInfo->ReadCacheFromFile( &footprintInfoCache );
|
||||
}
|
||||
|
||||
return footprintInfo;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,13 +38,10 @@ PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
|||
PCB_BASE_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ),
|
||||
m_rotationAngle( 900 ), m_undoRedoBlocked( false )
|
||||
{
|
||||
static bool oneShot = true;
|
||||
|
||||
if( oneShot )
|
||||
if( !GFootprintList.GetCount() )
|
||||
{
|
||||
wxTextFile footprintInfoCache( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.ReadCacheFromFile( &footprintInfoCache );
|
||||
oneShot = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue