From 1208035da3c2f752794c3e0acfc6d90dd4fa1dbd Mon Sep 17 00:00:00 2001
From: Leo Franchi <lfranchi@kde.org>
Date: Mon, 17 Oct 2011 16:59:52 -0400
Subject: [PATCH] Make sure not to sort, these are charts

---
 src/libtomahawk/widgets/whatshotwidget.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/libtomahawk/widgets/whatshotwidget.cpp b/src/libtomahawk/widgets/whatshotwidget.cpp
index e3174cf2b..f4550d872 100644
--- a/src/libtomahawk/widgets/whatshotwidget.cpp
+++ b/src/libtomahawk/widgets/whatshotwidget.cpp
@@ -76,9 +76,6 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent )
 
     connect( ui->breadCrumbLeft, SIGNAL( currentIndexChanged( QModelIndex ) ), SLOT( leftCrumbIndexChanged(QModelIndex) ) );
 
-    /// Disable sorting, its a ranked list!
-    ui->additionsView->proxyModel()->sort( -1 );
-
     ui->tracksViewLeft->setFrameShape( QFrame::NoFrame );
     ui->tracksViewLeft->setAttribute( Qt::WA_MacShowFocusRect, 0 );
     ui->tracksViewLeft->overlay()->setEnabled( false );
@@ -93,8 +90,6 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent )
     ui->artistsViewLeft->setFrameShape( QFrame::NoFrame );
     ui->artistsViewLeft->setAttribute( Qt::WA_MacShowFocusRect, 0 );
 
-    artistsProxy->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel
-
     ui->artistsViewLeft->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
     ui->artistsViewLeft->header()->setVisible( false );
 
@@ -381,6 +376,7 @@ void
 WhatsHotWidget::setLeftViewAlbums( AlbumModel* model )
 {
     ui->additionsView->setAlbumModel( model );
+    ui->additionsView->proxyModel()->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel
     ui->stackLeft->setCurrentIndex( 2 );
 }
 
@@ -389,6 +385,7 @@ void
 WhatsHotWidget::setLeftViewArtists( TreeModel* model )
 {
     ui->artistsViewLeft->setTreeModel( model );
+    ui->artistsViewLeft->proxyModel()->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel
     ui->stackLeft->setCurrentIndex( 1 );
 }
 
@@ -397,5 +394,6 @@ void
 WhatsHotWidget::setLeftViewTracks( PlaylistModel* model )
 {
     ui->tracksViewLeft->setPlaylistModel( model );
+    ui->tracksViewLeft->proxyModel()->sort( -1 );
     ui->stackLeft->setCurrentIndex( 0 );
 }