diff --git a/include/footprint_info.h b/include/footprint_info.h index 93003b0c43..e4000efcb9 100644 --- a/include/footprint_info.h +++ b/include/footprint_info.h @@ -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. diff --git a/pcbnew/footprint_info_impl.cpp b/pcbnew/footprint_info_impl.cpp index 8f7596a4e1..2d33a058f2 100644 --- a/pcbnew/footprint_info_impl.cpp +++ b/pcbnew/footprint_info_impl.cpp @@ -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& aFunc ) { try diff --git a/pcbnew/footprint_info_impl.h b/pcbnew/footprint_info_impl.h index 5f5d7d6803..7dc4450840 100644 --- a/pcbnew/footprint_info_impl.h +++ b/pcbnew/footprint_info_impl.h @@ -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();