Give CVPCB its own footprint info list.
There's a smoking gun on Mac Big Sur that suggests that sharing the table between binaries may be corrupting the heap. Fixes https://gitlab.com/kicad/code/kicad/issues/8657
This commit is contained in:
parent
9f51f7b055
commit
15a094c647
|
@ -27,6 +27,7 @@ set( CVPCB_DIALOGS
|
|||
set( CVPCB_SRCS
|
||||
${CMAKE_SOURCE_DIR}/common/base_units.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/board_stackup_manager/stackup_predefined_prms.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/footprint_info_impl.cpp
|
||||
auto_associate.cpp
|
||||
components_listbox.cpp
|
||||
display_footprints_frame.cpp
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <kiway_express.h>
|
||||
#include <macros.h>
|
||||
#include <netlist_reader/netlist_reader.h>
|
||||
#include <footprint_info_impl.h>
|
||||
#include <numeric>
|
||||
#include <tool/action_manager.h>
|
||||
#include <tool/action_toolbar.h>
|
||||
|
@ -59,6 +60,12 @@
|
|||
#define CVPCB_MAINFRAME_NAME wxT( "CvpcbFrame" )
|
||||
|
||||
|
||||
/// The global footprint info table. This is performance-intensive to build so we
|
||||
/// keep a hash-stamped global version. Any deviation from the request vs. stored
|
||||
/// hash will result in it being rebuilt.
|
||||
FOOTPRINT_LIST_IMPL GFootprintList;
|
||||
|
||||
|
||||
CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
KIWAY_PLAYER( aKiway, aParent, FRAME_CVPCB, _( "Assign Footprints" ), wxDefaultPosition,
|
||||
wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, CVPCB_MAINFRAME_NAME )
|
||||
|
@ -71,7 +78,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_skipComponentSelect = false;
|
||||
m_filteringOptions = FOOTPRINTS_LISTBOX::UNFILTERED_FP_LIST;
|
||||
m_tcFilterString = NULL;
|
||||
m_FootprintsList = FOOTPRINT_LIST::GetInstance( Kiway() );
|
||||
m_FootprintsList = &GFootprintList;
|
||||
m_initialized = false;
|
||||
m_aboutTitle = "CvPcb";
|
||||
|
||||
|
@ -89,6 +96,8 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
ReCreateMenuBar();
|
||||
ReCreateHToolbar();
|
||||
|
||||
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
|
||||
// Create list of available footprints and symbols of the schematic
|
||||
BuildSymbolsListBox();
|
||||
BuildFootprintsListBox();
|
||||
|
|
Loading…
Reference in New Issue