mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Prevent stale names in fp browser
When switching libraries, if there is an additional footprint with the same name, we don't want to select it by default as this will prevent updating the footprint display. Instead, force the update Fixes https://gitlab.com/kicad/code/kicad/-/issues/9763
This commit is contained in:
parent
dad60f99c0
commit
cb620338db
@ -534,7 +534,10 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList()
|
||||
m_fpList->Append( footprint->GetFootprintName() );
|
||||
}
|
||||
|
||||
int index = m_fpList->FindString( getCurFootprintName(), true );
|
||||
int index = wxNOT_FOUND;
|
||||
|
||||
if( !getCurFootprintName().IsEmpty() )
|
||||
index = m_fpList->FindString( getCurFootprintName(), true );
|
||||
|
||||
if( index == wxNOT_FOUND )
|
||||
{
|
||||
@ -555,6 +558,9 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList()
|
||||
{
|
||||
m_fpList->SetSelection( index, true );
|
||||
m_fpList->EnsureVisible( index );
|
||||
|
||||
wxCommandEvent dummy;
|
||||
ClickOnFootprintList( dummy );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user