From d59c5687db9d9093026b1471180b80e91b4a6c58 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 20 Aug 2020 00:44:15 +0100 Subject: [PATCH] Don't wrap-around before first entry. --- common/dialogs/eda_view_switcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/dialogs/eda_view_switcher.cpp b/common/dialogs/eda_view_switcher.cpp index 37264bcaa9..2e1c0d0307 100644 --- a/common/dialogs/eda_view_switcher.cpp +++ b/common/dialogs/eda_view_switcher.cpp @@ -95,7 +95,7 @@ bool EDA_VIEW_SWITCHER::TryBefore( wxEvent& aEvent ) if( wxGetKeyState( WXK_SHIFT ) ) { - if( --idx <= 0 ) + if( --idx < 0 ) m_listBox->SetSelection( (int) m_listBox->GetCount() - 1 ); else m_listBox->SetSelection( idx );