[vlc-commits] commit: Qt4: reset current_index cache sametime as i_cache_id ( Ilkka Ollakka )

git at videolan.org git at videolan.org
Wed Jun 23 14:10:09 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Jun 23 15:09:53 2010 +0300| [7cdb0761b23277f508cefeb5dca4098c9ec4120d] | committer: Ilkka Ollakka 

Qt4: reset current_index cache sametime as i_cache_id

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7cdb0761b23277f508cefeb5dca4098c9ec4120d
---

 .../gui/qt4/components/playlist/playlist_model.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 2ec10d9..75d885b 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -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 )
     {



More information about the vlc-commits mailing list