Commit ba7b7a8d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - fix QT playlist display bug when clicking on top-level of playlist.

Patch by Alexander Gall. Thanks.
parent f02ba540
......@@ -745,11 +745,14 @@ void PLModel::rebuild( playlist_item_t *p_root )
/* Clear the tree */
if( rootItem )
{
beginRemoveRows( index( rootItem, 0 ), 0,
rootItem->children.size() -1 );
qDeleteAll( rootItem->children );
rootItem->children.clear();
endRemoveRows();
if( rootItem->children.size() )
{
beginRemoveRows( index( rootItem, 0 ), 0,
rootItem->children.size() -1 );
qDeleteAll( rootItem->children );
rootItem->children.clear();
endRemoveRows();
}
}
if( p_root )
{
......
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