pcbnew: Update focus in browser
When we refresh a scrolled window to get the GTK scrollbars updated, we can capture the mouse, making key-only scrolling difficult when we want the window not focused. This resets the active focus after refresh. Fixes: lp:1841565 * https://bugs.launchpad.net/kicad/+bug/1841565
This commit is contained in:
parent
9dac8534c1
commit
d0adaf1efd
|
@ -473,10 +473,18 @@ void FOOTPRINT_VIEWER_FRAME::OnCharHook( wxKeyEvent& aEvent )
|
||||||
}
|
}
|
||||||
else if( aEvent.GetKeyCode() == WXK_DOWN )
|
else if( aEvent.GetKeyCode() == WXK_DOWN )
|
||||||
{
|
{
|
||||||
|
// Need to reset the focus after selection due to GTK mouse-refresh
|
||||||
|
// that captures the mouse into the canvas to update scrollbars
|
||||||
if( m_libFilter->HasFocus() )
|
if( m_libFilter->HasFocus() )
|
||||||
|
{
|
||||||
selectNext( m_libList );
|
selectNext( m_libList );
|
||||||
|
m_libFilter->SetFocus();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
selectNext( m_fpList );
|
selectNext( m_fpList );
|
||||||
|
m_fpList->SetFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( aEvent.GetKeyCode() == WXK_TAB && m_libFilter->HasFocus() )
|
else if( aEvent.GetKeyCode() == WXK_TAB && m_libFilter->HasFocus() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue