From a73d1cd34298e7e2b997d296e119d68bc52d8f5a Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sat, 25 Feb 2012 20:07:33 -0500 Subject: [PATCH] Don't calculate height by assuming rows are same height anymore, as they are not. --- src/libtomahawk/jobview/JobStatusView.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/jobview/JobStatusView.cpp b/src/libtomahawk/jobview/JobStatusView.cpp index 08e8af722..28625d411 100644 --- a/src/libtomahawk/jobview/JobStatusView.cpp +++ b/src/libtomahawk/jobview/JobStatusView.cpp @@ -106,8 +106,11 @@ JobStatusView::sizeHint() const if ( m_view->model()->rowCount() ) { - unsigned int rowheight = m_view->sizeHintForRow( 0 ); - y += rowheight * m_view->model()->rowCount() + 2; + for ( int i = 0; i < m_view->model()->rowCount(); i++ ) + { + y += m_view->sizeHintForRow( i ); + } + y += 2; // some padding } return QSize( 0, y );