1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 23:39:42 +01:00

* Fixed auto-scrolling with the current selection.

This commit is contained in:
Christian Muehlhaeuser 2011-12-02 13:02:28 +01:00
parent f46d0803be
commit 8941036105
8 changed files with 11 additions and 19 deletions

View File

@ -469,7 +469,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
emit started( m_currentTrack );
if ( TomahawkSettings::instance()->verboseNotifications() )
sendNowPlayingNotification();
sendNowPlayingNotification();
if ( TomahawkSettings::instance()->privateListeningMode() != TomahawkSettings::FullyPrivate )
{

View File

@ -116,7 +116,6 @@ AlbumView::setAlbumModel( AlbumModel* model )
connect( m_model, SIGNAL( loadingStarted() ), m_loadingSpinner, SLOT( fadeIn() ) );
connect( m_model, SIGNAL( loadingFinished() ), m_loadingSpinner, SLOT( fadeOut() ) );
setAcceptDrops( false );
onViewChanged(); // Fetch covers if albums were added to model before model was attached to view
}

View File

@ -138,7 +138,6 @@ ArtistView::setTreeModel( TreeModel* model )
connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) );
guid(); // this will set the guid on the header
setAcceptDrops( false );
if ( model->columnStyle() == TreeModel::TrackOnly )
{
@ -154,8 +153,10 @@ ArtistView::setTreeModel( TreeModel* model )
void
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& /* previous */ )
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{
QTreeView::currentChanged( current, previous );
if ( !m_updateContextView )
return;
@ -196,7 +197,6 @@ ArtistView::onItemActivated( const QModelIndex& index )
void
ArtistView::keyPressEvent( QKeyEvent* event )
{
qDebug() << Q_FUNC_INFO;
QTreeView::keyPressEvent( event );
if ( !model() )
@ -209,13 +209,6 @@ ArtistView::keyPressEvent( QKeyEvent* event )
}
void
ArtistView::paintEvent( QPaintEvent* event )
{
QTreeView::paintEvent( event );
}
void
ArtistView::resizeEvent( QResizeEvent* event )
{

View File

@ -84,8 +84,7 @@ protected:
virtual void startDrag( Qt::DropActions supportedActions );
virtual void resizeEvent( QResizeEvent* event );
void paintEvent( QPaintEvent* event );
void keyPressEvent( QKeyEvent* event );
virtual void keyPressEvent( QKeyEvent* event );
protected slots:
virtual void currentChanged( const QModelIndex& current, const QModelIndex& previous );

View File

@ -35,7 +35,6 @@ CollectionView::CollectionView( QWidget* parent )
setProxyModel( new CollectionProxyModel( this ) );
setDragDropMode( QAbstractItemView::DragOnly );
setAcceptDrops( false );
}

View File

@ -156,8 +156,10 @@ TrackView::setTrackModel( TrackModel* model )
void
TrackView::currentChanged( const QModelIndex& current, const QModelIndex& /* previous */ )
TrackView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{
QTreeView::currentChanged( current, previous );
if ( !m_updateContextView )
return;

View File

@ -18,9 +18,7 @@
#include "treemodel.h"
#include <QListView>
#include <QMimeData>
#include <QNetworkReply>
#include "source.h"
#include "sourcelist.h"

View File

@ -394,7 +394,8 @@ ViewManager::playlistInterfaceChanged( Tomahawk::PlaylistInterface* interface )
if ( !pl.isNull() )
{
TomahawkSettings::instance()->appendRecentlyPlayedPlaylist( pl );
} else
}
else
{
pl = dynamicPlaylistForInterface( interface );
if ( !pl.isNull() )
@ -409,6 +410,7 @@ ViewManager::showWelcomePage()
return show( m_welcomeWidget );
}
Tomahawk::ViewPage*
ViewManager::showWhatsHotPage()
{