Footprint viewer: ensure the footprint is updated after new library selection

Previously, if the first fp of the new lib has the same name as the old
displayed fp, the old fp was not replace by the new fp.
From master branch
This commit is contained in:
jean-pierre charras 2023-03-29 16:53:49 +02:00
parent d513a9fe5c
commit 80b842a704
2 changed files with 4 additions and 1 deletions

View File

@ -731,6 +731,9 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& aEvent )
setCurNickname( name );
// Ensure the displayed footprint is loaded/reloaded from the new library
setCurFootprintName( wxEmptyString );
ReCreateFootprintList();
UpdateTitle();
}

View File

@ -301,7 +301,7 @@ int TEARDROP_MANAGER::addTeardropsOnTracks( BOARD_COMMIT* aCommitter )
TEARDROP_PARAMETERS* currParams = m_prmsList->GetParameters( TARGET_TRACK );
// Explore groups (a group is a set of tracks on the same layer and the same net):
for( auto grp : trackLookupList.GetBuffer() )
for( auto& grp : trackLookupList.GetBuffer() )
{
int layer, netcode;
TRACK_BUFFER::GetNetcodeAndLayerFromIndex( grp.first, &layer, &netcode );