]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist_model.cpp
The playlist is not locked so don't pretend that the case.
[vlc] / modules / gui / qt4 / components / playlist / playlist_model.cpp
index 0191ae76a5599a130386b33fc379d07d69180ae8..2ec2458ec3f5c2a12023a72e59a3046266088755 100644 (file)
@@ -715,6 +715,16 @@ void PLModel::sort( int column, Qt::SortOrder order )
     int i_index = -1;
     int i_flag = 0;
 
+    // FIXME: Disable sorting on startup by ignoring
+    // first call of sorting caused by showing dialog
+    // see: standardpanel.cpp:65
+    static bool b_first_time = true;
+    if( b_first_time )
+    {
+        b_first_time = false;
+        return;
+    }
+
 #define CHECK_COLUMN( meta )                        \
 {                                                   \
     if( ( shownFlags() & meta ) )                   \
@@ -813,13 +823,14 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
 void PLModel::viewchanged( int meta )
 {
     assert( meta );
+    int _meta = meta;
     if( rootItem )
     {
         int index=-1;
-        while( meta )
+        while( _meta )
         {
             index++;
-            meta >>= 1;
+            _meta >>= 1;
         }
 
         /* UNUSED        emit layoutAboutToBeChanged(); */
@@ -865,7 +876,7 @@ void PLModel::popupInfo()
 {
     playlist_item_t *p_item = playlist_ItemGetById( p_playlist,
                                                     i_popup_item,
-                                                    true );
+                                                    false );
     if( p_item )
     {
         MediaInfoDialog *mid = new MediaInfoDialog( p_intf, p_item->p_input );