Clear timestamp when clearing cache.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17913
This commit is contained in:
Jeff Young 2024-06-16 10:46:22 +01:00
parent e3231e6996
commit 5a9b681009
3 changed files with 10 additions and 4 deletions

View File

@ -191,10 +191,7 @@ public:
/**
* @return Clears the footprint info cache
*/
void Clear()
{
m_list.clear();
}
virtual void Clear() = 0;
/**
* Get info for a footprint by id.

View File

@ -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 )
{
try

View File

@ -93,6 +93,8 @@ public:
bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = nullptr,
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
void Clear() override;
protected:
void loadLibs();
void loadFootprints();