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:
parent
33e0116e4b
commit
bddbc7a194
@ -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 )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -188,6 +188,7 @@ ArtistView::onScrollTimeout()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user