diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index c59352f3b8..a1afa951a3 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -215,11 +215,20 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event ) if( m_footprintList.IsEmpty() ) return; + // On some plateforms (OSX) the focus is lost when the viewers (fp and 3D viewers) + // are opened and refreshed when a new footprint is selected. + // If the listbox has the focus before selecting a new footprint, it will be forced + // after selection. + bool hasFocus = HasFocus(); + // If the footprint view window is displayed, update the footprint. if( GetParent()->GetFootprintViewerFrame() ) GetParent()->CreateScreenCmp(); GetParent()->DisplayStatus(); + + if( hasFocus ) + SetFocus(); }