From 43cbeb0e6bbc73770d660f84b89610f1aa597f60 Mon Sep 17 00:00:00 2001 From: Visa Putkinen Date: Tue, 18 Dec 2012 00:08:33 +0200 Subject: [PATCH] Swap min and max in stats view --- weightgraph/weightstatsview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/weightgraph/weightstatsview.cpp b/weightgraph/weightstatsview.cpp index cb3505f..7ea1e44 100644 --- a/weightgraph/weightstatsview.cpp +++ b/weightgraph/weightstatsview.cpp @@ -45,12 +45,12 @@ WeightStatsView::WeightStatsView(WeightDataModel *wdm, QWidget *parent) : changeLayout->addWidget(changeNote, 0, Qt::AlignVCenter); lo->addWidget(changeContainer); - min = new QLabel(container); - lo->addWidget(min); - max = new QLabel(container); lo->addWidget(max); + min = new QLabel(container); + lo->addWidget(min); + updateStats(); } @@ -92,8 +92,8 @@ void WeightStatsView::updateStats() lastNote->setText(""); change->setText("Change: No data"); changeNote->setText(""); - min->setText("Min: No data"); max->setText("Max: No data"); + min->setText("Min: No data"); return; } QString unit = Settings::weightUnit(); @@ -109,6 +109,6 @@ void WeightStatsView::updateStats() .arg(unit)); changeNote->setText(tr("(%1)").arg(dateIntervalString(f.date.daysTo(l.date)))); - min->setText(tr("Min: %1 %2").arg(wdm->minWeight()).arg(unit)); max->setText(tr("Max: %1 %2").arg(wdm->maxWeight()).arg(unit)); + min->setText(tr("Min: %1 %2").arg(wdm->minWeight()).arg(unit)); } -- 1.7.9.5