Cvpcb: fix a focus issue (on OSX), when using arrow keys to scroll the footprint list box, if the footprint and 3D viewers are opened.
This commit is contained in:
parent
ade1d1fe74
commit
4441a4b4c7
|
@ -215,11 +215,20 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event )
|
||||||
if( m_footprintList.IsEmpty() )
|
if( m_footprintList.IsEmpty() )
|
||||||
return;
|
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 the footprint view window is displayed, update the footprint.
|
||||||
if( GetParent()->GetFootprintViewerFrame() )
|
if( GetParent()->GetFootprintViewerFrame() )
|
||||||
GetParent()->CreateScreenCmp();
|
GetParent()->CreateScreenCmp();
|
||||||
|
|
||||||
GetParent()->DisplayStatus();
|
GetParent()->DisplayStatus();
|
||||||
|
|
||||||
|
if( hasFocus )
|
||||||
|
SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue