Commit 945deeb2 authored by Clément Stenac's avatar Clément Stenac

Don't rebuild the tree on node sort

parent 678c0546
......@@ -468,6 +468,14 @@ void Playlist::CreateNode( playlist_t *p_playlist, playlist_item_t *p_node,
-1,-1, new PlaylistItem( p_node ) );
treectrl->SetItemImage( node, p_node->input.i_type );
UpdateNodeChildren( p_playlist, p_node, node );
}
void Playlist::UpdateNodeChildren( playlist_t *p_playlist,
playlist_item_t *p_node,
wxTreeItemId node )
{
for( int i = 0; i< p_node->i_children ; i++ )
{
/* Append the item */
......@@ -1507,7 +1515,10 @@ void Playlist::OnPopupSort( wxMenuEvent& event )
playlist_RecursiveNodeSort( p_playlist, p_wxitem->p_item,
SORT_TITLE_NODES_FIRST, ORDER_NORMAL );
vlc_mutex_unlock( &p_playlist->object_lock );
b_need_update = VLC_TRUE;
treectrl->DeleteChildren( i_popup_item );
UpdateNodeChildren( p_playlist, p_wxitem->p_item, i_popup_item );
vlc_object_release( p_playlist );
}
}
......
......@@ -838,6 +838,7 @@ private:
/* Update */
void UpdateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
void UpdateNodeChildren( playlist_t *, playlist_item_t*, wxTreeItemId );
void CreateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
wxTreeItemId FindItem( wxTreeItemId, playlist_item_t * );
......
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