]> git.sesse.net Git - vlc/commitdiff
qt4: don't rebuild playlist-model from start when adding/removing columns
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 18 Aug 2009 19:05:35 +0000 (22:05 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 18 Aug 2009 19:05:35 +0000 (22:05 +0300)
modules/gui/qt4/components/playlist/playlist_model.cpp

index fcdf44af379600e62ed52787ab79d4267d00da41..72e55a2d3031e6e2e1de3eb2f2b48a780b5aa997 100644 (file)
@@ -1004,6 +1004,8 @@ void PLModel::viewchanged( int meta )
         index = __MIN( index, columnCount() );
         QModelIndex parent = createIndex( 0, 0, rootItem );
 
+        emit layoutAboutToBeChanged();
+
         if( i_showflags & meta )
             /* Removing columns */
         {
@@ -1020,8 +1022,10 @@ void PLModel::viewchanged( int meta )
             getSettings()->setValue( "qt-pl-showflags", i_showflags );
             emit endInsertColumns();
         }
+
         emit columnsChanged( meta );
-        rebuild();
+        emit layoutChanged();
+
     }
 }