1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +02: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 ); emit started( m_currentTrack );
if ( TomahawkSettings::instance()->verboseNotifications() ) if ( TomahawkSettings::instance()->verboseNotifications() )
sendNowPlayingNotification(); sendNowPlayingNotification();
if ( TomahawkSettings::instance()->privateListeningMode() != TomahawkSettings::FullyPrivate ) 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( loadingStarted() ), m_loadingSpinner, SLOT( fadeIn() ) );
connect( m_model, SIGNAL( loadingFinished() ), m_loadingSpinner, SLOT( fadeOut() ) ); 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 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() ) ); connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) );
guid(); // this will set the guid on the header guid(); // this will set the guid on the header
setAcceptDrops( false );
if ( model->columnStyle() == TreeModel::TrackOnly ) if ( model->columnStyle() == TreeModel::TrackOnly )
{ {
@@ -154,8 +153,10 @@ ArtistView::setTreeModel( TreeModel* model )
void void
ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& /* previous */ ) ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{ {
QTreeView::currentChanged( current, previous );
if ( !m_updateContextView ) if ( !m_updateContextView )
return; return;
@@ -196,7 +197,6 @@ ArtistView::onItemActivated( const QModelIndex& index )
void void
ArtistView::keyPressEvent( QKeyEvent* event ) ArtistView::keyPressEvent( QKeyEvent* event )
{ {
qDebug() << Q_FUNC_INFO;
QTreeView::keyPressEvent( event ); QTreeView::keyPressEvent( event );
if ( !model() ) if ( !model() )
@@ -209,13 +209,6 @@ ArtistView::keyPressEvent( QKeyEvent* event )
} }
void
ArtistView::paintEvent( QPaintEvent* event )
{
QTreeView::paintEvent( event );
}
void void
ArtistView::resizeEvent( QResizeEvent* event ) ArtistView::resizeEvent( QResizeEvent* event )
{ {

View File

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

View File

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

View File

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

View File

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

View File

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