1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-13 20:41:58 +02:00

* Fixed TWK-642: Update Footnotes when selecting an album in AlbumView.

This commit is contained in:
Christian Muehlhaeuser 2012-03-02 02:45:56 +01:00
parent 33e0116e4b
commit bddbc7a194
3 changed files with 19 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include <qmath.h>
#include "audio/audioengine.h"
#include "context/ContextWidget.h"
#include "tomahawksettings.h"
#include "artist.h"
#include "albumitem.h"
@ -113,6 +114,20 @@ AlbumView::setAlbumModel( AlbumModel* model )
}
void
AlbumView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{
QListView::currentChanged( current, previous );
AlbumItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
if ( item )
{
if ( !item->album().isNull() )
ViewManager::instance()->context()->setAlbum( item->album() );
}
}
void
AlbumView::onItemActivated( const QModelIndex& index )
{

View File

@ -71,6 +71,9 @@ protected:
void paintEvent( QPaintEvent* event );
void resizeEvent( QResizeEvent* event );
protected slots:
virtual void currentChanged( const QModelIndex& current, const QModelIndex& previous );
private slots:
void onItemCountChanged( unsigned int items );

View File

@ -188,6 +188,7 @@ ArtistView::onScrollTimeout()
}
}
void
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{