1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02:00

Fix Cover loading in ColumnView

This commit is contained in:
Uwe L. Korn
2014-07-18 04:07:00 +01:00
parent adf59d7b6d
commit 2a5b90b60a
2 changed files with 9 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ ColumnView::ColumnView( QWidget* parent )
setPreviewWidget( m_previewWidget ); setPreviewWidget( m_previewWidget );
m_timer.setInterval( SCROLL_TIMEOUT ); m_timer.setInterval( SCROLL_TIMEOUT );
connect( verticalScrollBar(), SIGNAL( sliderMoved( int ) ), SLOT( onViewChanged() ) );
connect( verticalScrollBar(), SIGNAL( rangeChanged( int, int ) ), SLOT( onViewChanged() ) ); connect( verticalScrollBar(), SIGNAL( rangeChanged( int, int ) ), SLOT( onViewChanged() ) );
connect( verticalScrollBar(), SIGNAL( valueChanged( int ) ), SLOT( onViewChanged() ) ); connect( verticalScrollBar(), SIGNAL( valueChanged( int ) ), SLOT( onViewChanged() ) );
connect( &m_timer, SIGNAL( timeout() ), SLOT( onScrollTimeout() ) ); connect( &m_timer, SIGNAL( timeout() ), SLOT( onScrollTimeout() ) );
@@ -132,6 +133,7 @@ ColumnView::setTreeModel( TreeModel* model )
connect( m_proxyModel, SIGNAL( filteringFinished() ), SLOT( onFilterChangeFinished() ) ); connect( m_proxyModel, SIGNAL( filteringFinished() ), SLOT( onFilterChangeFinished() ) );
connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) ); connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) );
connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( fixScrollBars() ) );
guid(); // this will set the guid on the header guid(); // this will set the guid on the header
@@ -478,6 +480,10 @@ ColumnView::fixScrollBars()
if ( sb && sb->orientation() == Qt::Vertical ) if ( sb && sb->orientation() == Qt::Vertical )
{ {
sb->setSingleStep( 6 ); sb->setSingleStep( 6 );
connect( sb, SIGNAL( sliderMoved( int ) ), SLOT( onViewChanged() ) );
connect( sb, SIGNAL( rangeChanged( int, int ) ), SLOT( onViewChanged() ) );
connect( sb, SIGNAL( valueChanged( int ) ), SLOT( onViewChanged() ) );
break; break;
} }

View File

@@ -98,9 +98,11 @@ private slots:
void onCustomContextMenu( const QPoint& pos ); void onCustomContextMenu( const QPoint& pos );
void onMenuTriggered( int action ); void onMenuTriggered( int action );
private: private slots:
void fixScrollBars(); void fixScrollBars();
private:
OverlayWidget* m_overlay; OverlayWidget* m_overlay;
TreeModel* m_model; TreeModel* m_model;
TreeProxyModel* m_proxyModel; TreeProxyModel* m_proxyModel;