Clear timestamp when clearing cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17913
(cherry picked from commit 5a9b681009
)
This commit is contained in:
parent
df3924421d
commit
265e2d61be
|
@ -191,10 +191,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @return Clears the footprint info cache
|
* @return Clears the footprint info cache
|
||||||
*/
|
*/
|
||||||
void Clear()
|
virtual void Clear() = 0;
|
||||||
{
|
|
||||||
m_list.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info for a footprint by id.
|
* Get info for a footprint by id.
|
||||||
|
|
|
@ -66,6 +66,13 @@ void FOOTPRINT_INFO_IMPL::load()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FOOTPRINT_LIST_IMPL::Clear()
|
||||||
|
{
|
||||||
|
m_list.clear();
|
||||||
|
m_list_timestamp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool FOOTPRINT_LIST_IMPL::CatchErrors( const std::function<void()>& aFunc )
|
bool FOOTPRINT_LIST_IMPL::CatchErrors( const std::function<void()>& aFunc )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -93,6 +93,8 @@ public:
|
||||||
bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = nullptr,
|
bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = nullptr,
|
||||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||||
|
|
||||||
|
void Clear() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void loadLibs();
|
void loadLibs();
|
||||||
void loadFootprints();
|
void loadFootprints();
|
||||||
|
|
Loading…
Reference in New Issue