From 49ad41866a7d7dff329c42afc1bd9dde376eadc3 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 25 Dec 2011 23:58:07 +1000 Subject: [PATCH] More edge fixes in overview range selection --- Graphs/gSummaryChart.cpp | 4 ++-- overview.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Graphs/gSummaryChart.cpp b/Graphs/gSummaryChart.cpp index 7d1ece1c..67843ca7 100644 --- a/Graphs/gSummaryChart.cpp +++ b/Graphs/gSummaryChart.cpp @@ -220,7 +220,7 @@ void SummaryChart::SetDay(Day * nullday) m_miny=0; } // m_minx=qint64(QDateTime(PROFILE.FirstDay(),QTime(0,0,0),Qt::UTC).toTime_t())*1000L; - m_maxx=qint64(QDateTime(PROFILE.LastDay().addDays(1),QTime(0,0,0),Qt::UTC).toTime_t())*1000L; + m_maxx=qint64(QDateTime(PROFILE.LastDay(),QTime(23,59,0),Qt::UTC).toTime_t())*1000L; } @@ -477,7 +477,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height) lastdaygood=true; if (Q>maxx+extra) break; } else { - if (QdateStart->date(),QTime(0,0,0),Qt::UTC).toTime_t())*1000L; - qint64 d2=qint64(QDateTime(date,QTime(23,59,59),Qt::UTC).toTime_t())*1000L; + qint64 d1=qint64(QDateTime(ui->dateStart->date(),QTime(0,10,0),Qt::UTC).toTime_t())*1000L; + qint64 d2=qint64(QDateTime(date,QTime(23,0,0),Qt::UTC).toTime_t())*1000L; GraphView->SetXBounds(d1,d2); } void Overview::on_dateStart_dateChanged(const QDate &date) { - qint64 d1=qint64(QDateTime(date,QTime(0,0,0),Qt::UTC).toTime_t())*1000L; - qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,59,59),Qt::UTC).toTime_t())*1000L; + qint64 d1=qint64(QDateTime(date,QTime(0,10,0),Qt::UTC).toTime_t())*1000L; + qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,0,0),Qt::UTC).toTime_t())*1000L; GraphView->SetXBounds(d1,d2); } @@ -373,7 +373,7 @@ void Overview::on_dateStart_dateChanged(const QDate &date) void Overview::on_toolButton_clicked() { qint64 d1=qint64(QDateTime(ui->dateStart->date(),QTime(0,10,0),Qt::UTC).toTime_t())*1000L; - qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,0,0),Qt::UTC).toTime_t())*1000L; + qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,00,0),Qt::UTC).toTime_t())*1000L; GraphView->SetXBounds(d1,d2); }