Don't findnext on an empty string; show the dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/10313
This commit is contained in:
Jeff Young 2022-01-18 18:59:04 +00:00
parent 8c758aeeb5
commit 60fc75e239
1 changed files with 8 additions and 1 deletions

View File

@ -129,8 +129,15 @@ void DIALOG_FIND::search( bool aDirection )
bool endIsReached = false;
bool isFirstSearch = false;
// Add/move the search string to the top of the list if it isn't already there
searchString = m_searchCombo->GetValue();
if( searchString.IsEmpty() )
{
Show();
return;
}
// Add/move the search string to the top of the list if it isn't already there
index = m_searchCombo->FindString( searchString, true );
if( index == wxNOT_FOUND )