Commit 7cdb0761 authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: reset current_index cache sametime as i_cache_id

parent 53849a6e
...@@ -700,6 +700,7 @@ void PLModel::rebuild( playlist_item_t *p_root ) ...@@ -700,6 +700,7 @@ void PLModel::rebuild( playlist_item_t *p_root )
/* Invalidate cache */ /* Invalidate cache */
i_cached_id = i_cached_input_id = -1; i_cached_id = i_cached_input_id = -1;
current_index = QModelIndex();
if( rootItem ) rootItem->removeChildren(); if( rootItem ) rootItem->removeChildren();
...@@ -752,6 +753,7 @@ void PLModel::removeItem( PLItem *item ) ...@@ -752,6 +753,7 @@ void PLModel::removeItem( PLItem *item )
i_cached_id = -1; i_cached_id = -1;
i_cached_input_id = -1; i_cached_input_id = -1;
current_index = QModelIndex();
if( item->parentItem ) { if( item->parentItem ) {
int i = item->parentItem->children.indexOf( item ); int i = item->parentItem->children.indexOf( item );
...@@ -874,6 +876,7 @@ void PLModel::sort( int i_root_id, int column, Qt::SortOrder order ) ...@@ -874,6 +876,7 @@ void PLModel::sort( int i_root_id, int column, Qt::SortOrder order )
} }
i_cached_id = i_cached_input_id = -1; i_cached_id = i_cached_input_id = -1;
current_index = QModelIndex();
if( count ) if( count )
{ {
......
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