From 0db2ff22502943bb5d4c977456570264f4418f14 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 28 Aug 2014 23:28:05 +0200 Subject: [PATCH] * Slight optimization. --- src/libtomahawk/playlist/GridItemDelegate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/GridItemDelegate.cpp b/src/libtomahawk/playlist/GridItemDelegate.cpp index e9aa1d100..75bbf9276 100644 --- a/src/libtomahawk/playlist/GridItemDelegate.cpp +++ b/src/libtomahawk/playlist/GridItemDelegate.cpp @@ -540,7 +540,9 @@ GridItemDelegate::onViewChanged() { QRect rect = m_view->visualRect( index ); rect.setHeight( rect.width() ); - m_hoverControls.value( index )->move( rect.center() - QPoint( m_hoverControls[ index ]->width() / 2 -1, m_hoverControls[ index ]->height() / 2 -1 ) ); + + HoverControls* controls = m_hoverControls.value( index ); + controls->move( rect.center() - QPoint( controls->width() / 2 -1, controls->height() / 2 -1 ) ); } }