Passing a string to LIBRARY_TABLE's c'tor doesn't do what you think it does.

Also fixes nested tables being deleted out from under
the dialog.

Also fixes a bug where PANEL_DESIGN_BLOCK_LIB_TABLE
had fallen behind the the other two.
This commit is contained in:
Jeff Young
2026-01-20 13:18:46 +00:00
parent a8fcc466cd
commit f4e025596b
12 changed files with 47 additions and 33 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ void LIBRARY_MANAGER::loadTables( const wxString& aTablePath, LIBRARY_TABLE_SCOP
if( fn.IsFileReadable() )
{
auto table = std::make_unique<LIBRARY_TABLE>( fn, aScope );
std::unique_ptr<LIBRARY_TABLE> table = std::make_unique<LIBRARY_TABLE>( fn, aScope );
wxCHECK2( table->Type() == type, continue );
aTarget[type] = std::move( table );
loadNestedTables( *aTarget[type] );
@@ -99,7 +99,7 @@ void LIBRARY_MANAGER::loadNestedTables( LIBRARY_TABLE& aRootTable )
{
std::unordered_set<wxString> seenTables;
std::function<void(LIBRARY_TABLE&)> processOneTable =
std::function<void( LIBRARY_TABLE& )> processOneTable =
[&]( LIBRARY_TABLE& aTable )
{
seenTables.insert( aTable.Path() );