Commit 22193da5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Same as previous commit

(should close #87)
parent 99fecdd8
...@@ -1001,23 +1001,20 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) ) ...@@ -1001,23 +1001,20 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
FindItemByName( treectrl->GetRootItem(), search_string, FindItemByName( treectrl->GetRootItem(), search_string,
search_current, &pb_found ); search_current, &pb_found );
if( found.IsOk() ) if( !found.IsOk() )
{
search_current = found;
treectrl->SelectItem( found, true );
}
else
{ {
wxTreeItemId dummy; wxTreeItemId dummy;
search_current = dummy; search_current = dummy;
found = FindItemByName( treectrl->GetRootItem(), search_string, found = FindItemByName( treectrl->GetRootItem(), search_string,
search_current, &pb_found ); search_current, &pb_found );
}
if( found.IsOk() ) if( found.IsOk() )
{ {
search_current = found; search_current = found;
treectrl->EnsureVisible( found );
treectrl->SelectItem( found, true ); treectrl->SelectItem( found, true );
} }
}
} }
/********************************************************************** /**********************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment