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:
@@ -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() );
|
||||
|
||||
Reference in New Issue
Block a user