From c0e41809e6105b3942d03b22c24af92d6b1cf1d0 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 17 Apr 2013 04:03:19 +0200 Subject: [PATCH] * Request item repaint via PlayableItem. --- src/libtomahawk/playlist/PlayableItem.h | 1 + src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/PlayableItem.h b/src/libtomahawk/playlist/PlayableItem.h index a3903d402..025f7a2e9 100644 --- a/src/libtomahawk/playlist/PlayableItem.h +++ b/src/libtomahawk/playlist/PlayableItem.h @@ -53,6 +53,7 @@ public: void setIsPlaying( bool b ) { m_isPlaying = b; emit dataChanged(); } bool fetchingMore() const { return m_fetchingMore; } void setFetchingMore( bool b ) { m_fetchingMore = b; } + void requestRepaint() { emit dataChanged(); } QString name() const; QString artistName() const; diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index 052f58f30..cee8b474d 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -316,7 +316,8 @@ PlaylistItemDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, con if ( m_hoveringOver != index ) { - emit updateIndex( m_hoveringOver ); + PlayableItem* item = m_model->sourceModel()->itemFromIndex( m_model->mapToSource( index ) ); + item->requestRepaint(); m_hoveringOver = index; emit updateIndex( m_hoveringOver ); }