Read the fp-info-cache on pcb file load rather than on frame open
Otherwise in standalone mode pcbnew will never load the cache files and also later erase them :/
This commit is contained in:
parent
eff9c46e59
commit
3613bca5ea
|
@ -227,6 +227,14 @@ public:
|
||||||
return m_list;
|
return m_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the footprint info cache
|
||||||
|
*/
|
||||||
|
void Clear()
|
||||||
|
{
|
||||||
|
m_list.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info for a module by id.
|
* Get info for a module by id.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
#include <pcb_layer_widget.h>
|
#include <pcb_layer_widget.h>
|
||||||
#include <wx/wupdlock.h>
|
#include <wx/wupdlock.h>
|
||||||
|
#include "footprint_info_impl.h"
|
||||||
|
|
||||||
|
|
||||||
//#define USE_INSTRUMENTATION 1
|
//#define USE_INSTRUMENTATION 1
|
||||||
|
@ -468,6 +469,9 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
LoadProjectSettings();
|
LoadProjectSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear the cache footprint list which may be project specific
|
||||||
|
GFootprintList.Clear();
|
||||||
|
|
||||||
if( is_new )
|
if( is_new )
|
||||||
{
|
{
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -517,6 +521,10 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( GFootprintList.GetCount() == 0 )
|
||||||
|
{
|
||||||
|
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + "fp-info-cache" );
|
||||||
|
}
|
||||||
|
|
||||||
// 6.0 TODO: some settings didn't make it into the board file in 5.1 so as not to
|
// 6.0 TODO: some settings didn't make it into the board file in 5.1 so as not to
|
||||||
// change the file format. For 5.1 we must copy them across from the config-initialized
|
// change the file format. For 5.1 we must copy them across from the config-initialized
|
||||||
|
|
|
@ -39,10 +39,6 @@ PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
PCB_BASE_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ),
|
PCB_BASE_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ),
|
||||||
m_rotationAngle( 900 ), m_undoRedoBlocked( false )
|
m_rotationAngle( 900 ), m_undoRedoBlocked( false )
|
||||||
{
|
{
|
||||||
if( !GFootprintList.GetCount() )
|
|
||||||
{
|
|
||||||
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + "fp-info-cache" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME()
|
PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME()
|
||||||
|
|
Loading…
Reference in New Issue