From fb4c22c27483408007f072b83119447d3289767c Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Wed, 10 Feb 2016 17:31:00 +0100 Subject: [PATCH] Use correct count. --- src/modules/partition/gui/PartitionBarsView.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/partition/gui/PartitionBarsView.cpp b/src/modules/partition/gui/PartitionBarsView.cpp index 4d8294d22..7f3112257 100644 --- a/src/modules/partition/gui/PartitionBarsView.cpp +++ b/src/modules/partition/gui/PartitionBarsView.cpp @@ -215,7 +215,7 @@ PartitionBarsView::drawPartitions( QPainter* painter, const QRect& rect, const Q QVector< PartitionBarsView::Item >& items = pair.first; qreal& total = pair.second; int x = rect.x(); - for ( int row = 0; row < count; ++row ) + for ( int row = 0; row < items.count(); ++row ) { const auto& item = items[ row ]; int width; @@ -272,7 +272,7 @@ PartitionBarsView::indexAt( const QPoint &point, QVector< PartitionBarsView::Item >& items = pair.first; qreal& total = pair.second; int x = rect.x(); - for ( int row = 0; row < count; ++row ) + for ( int row = 0; row < items.count(); ++row ) { const auto& item = items[ row ]; int width; @@ -335,7 +335,7 @@ PartitionBarsView::visualRect( const QModelIndex& index, QVector< PartitionBarsView::Item >& items = pair.first; qreal& total = pair.second; int x = rect.x(); - for ( int row = 0; row < count; ++row ) + for ( int row = 0; row < items.count(); ++row ) { const auto& item = items[ row ]; int width;