]> git.sesse.net Git - vlc/commitdiff
Qt4: reset current_index cache sametime as i_cache_id
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 23 Jun 2010 12:09:53 +0000 (15:09 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Wed, 23 Jun 2010 12:09:53 +0000 (15:09 +0300)
modules/gui/qt4/components/playlist/playlist_model.cpp

index 2ec10d9978a9c7b1f8c794c4c5a79d2e3e58dac2..75d885bf2e763083bf92686f42fcc193595e12c2 100644 (file)
@@ -700,6 +700,7 @@ void PLModel::rebuild( playlist_item_t *p_root )
 
     /* Invalidate cache */
     i_cached_id = i_cached_input_id = -1;
+    current_index = QModelIndex();
 
     if( rootItem ) rootItem->removeChildren();
 
@@ -752,6 +753,7 @@ void PLModel::removeItem( PLItem *item )
 
     i_cached_id = -1;
     i_cached_input_id = -1;
+    current_index = QModelIndex();
 
     if( item->parentItem ) {
         int i = item->parentItem->children.indexOf( item );
@@ -874,6 +876,7 @@ void PLModel::sort( int i_root_id, int column, Qt::SortOrder order )
     }
 
     i_cached_id = i_cached_input_id = -1;
+    current_index = QModelIndex();
 
     if( count )
     {