Don't wrap-around before first entry.

This commit is contained in:
Jeff Young 2020-08-20 00:44:15 +01:00
parent 2f0b8eb5e9
commit d59c5687db
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ bool EDA_VIEW_SWITCHER::TryBefore( wxEvent& aEvent )
if( wxGetKeyState( WXK_SHIFT ) ) if( wxGetKeyState( WXK_SHIFT ) )
{ {
if( --idx <= 0 ) if( --idx < 0 )
m_listBox->SetSelection( (int) m_listBox->GetCount() - 1 ); m_listBox->SetSelection( (int) m_listBox->GetCount() - 1 );
else else
m_listBox->SetSelection( idx ); m_listBox->SetSelection( idx );