mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
* Fixed TWK-642: Update Footnotes when selecting an album in AlbumView.
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
|
|
||||||
#include "audio/audioengine.h"
|
#include "audio/audioengine.h"
|
||||||
|
#include "context/ContextWidget.h"
|
||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
#include "artist.h"
|
#include "artist.h"
|
||||||
#include "albumitem.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
|
void
|
||||||
AlbumView::onItemActivated( const QModelIndex& index )
|
AlbumView::onItemActivated( const QModelIndex& index )
|
||||||
{
|
{
|
||||||
|
@@ -71,6 +71,9 @@ protected:
|
|||||||
void paintEvent( QPaintEvent* event );
|
void paintEvent( QPaintEvent* event );
|
||||||
void resizeEvent( QResizeEvent* event );
|
void resizeEvent( QResizeEvent* event );
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
virtual void currentChanged( const QModelIndex& current, const QModelIndex& previous );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onItemCountChanged( unsigned int items );
|
void onItemCountChanged( unsigned int items );
|
||||||
|
|
||||||
|
@@ -188,6 +188,7 @@ ArtistView::onScrollTimeout()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
|
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user