Don't findnext on an empty string; show the dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10313
(cherry picked from commit 60fc75e239
)
This commit is contained in:
parent
6d7659fb20
commit
b608ebd058
|
@ -129,8 +129,15 @@ void DIALOG_FIND::search( bool aDirection )
|
||||||
bool endIsReached = false;
|
bool endIsReached = false;
|
||||||
bool isFirstSearch = 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();
|
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 );
|
index = m_searchCombo->FindString( searchString, true );
|
||||||
|
|
||||||
if( index == wxNOT_FOUND )
|
if( index == wxNOT_FOUND )
|
||||||
|
|
Loading…
Reference in New Issue