Commit 88e9c039 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Show "found" playlist item

(refs #87)
parent bf544aa4
......@@ -1001,22 +1001,19 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
FindItemByName( treectrl->GetRootItem(), search_string,
search_current, &pb_found );
if( found.IsOk() )
{
search_current = found;
treectrl->SelectItem( found, true );
}
else
if( !found.IsOk() )
{
wxTreeItemId dummy;
search_current = dummy;
found = FindItemByName( treectrl->GetRootItem(), search_string,
search_current, &pb_found );
if( found.IsOk() )
{
search_current = found;
treectrl->SelectItem( found, true );
}
}
if( found.IsOk() )
{
search_current = found;
treectrl->EnsureVisible( found );
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