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