From 198201aec23d17c5720bf16aea6d180fe428c9e2 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 17 Feb 2016 12:15:11 +0100 Subject: [PATCH] Don't try to reset hover-state if there is none. This speeds up collection browsing. --- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 3 +-- src/libtomahawk/playlist/TrackView.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index a0b21c8f4..e29afdfde 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -902,7 +902,7 @@ PlaylistItemDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, con void PlaylistItemDelegate::resetHoverIndex() { - if ( !m_model ) + if ( !m_model || !m_hoveringOver.isValid() ) return; QPersistentModelIndex idx = m_hoveringOver; @@ -922,7 +922,6 @@ PlaylistItemDelegate::resetHoverIndex() } emit updateIndex( idx ); - m_view->repaint(); } diff --git a/src/libtomahawk/playlist/TrackView.cpp b/src/libtomahawk/playlist/TrackView.cpp index a9eabfb8e..cbf342e51 100644 --- a/src/libtomahawk/playlist/TrackView.cpp +++ b/src/libtomahawk/playlist/TrackView.cpp @@ -687,7 +687,6 @@ TrackView::wheelEvent( QWheelEvent* event ) QTreeView::wheelEvent( event ); m_delegate->resetHoverIndex(); - repaint(); }