From 4719d4065d7707fed23edd8b9c8dde10cec56e47 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 22 Oct 2013 22:54:52 +1000 Subject: [PATCH] Fix sessionbar --- sleepyhead/daily.cpp | 6 ------ sleepyhead/sessionbar.cpp | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sleepyhead/daily.cpp b/sleepyhead/daily.cpp index 63a54381..3a7a04f1 100644 --- a/sleepyhead/daily.cpp +++ b/sleepyhead/daily.cpp @@ -1091,12 +1091,6 @@ QString Daily::getSleepTime(Day * cpap, Day * oxi) void Daily::Load(QDate date) { - if (sessbar) { - sessbar->clear(); - sessbar->deleteLater(); - sessbar=NULL; - } - dateDisplay->setText(""+date.toString(Qt::SystemLocaleLongDate)+""); previous_date=date; Day *cpap=PROFILE.GetDay(date,MT_CPAP); diff --git a/sleepyhead/sessionbar.cpp b/sleepyhead/sessionbar.cpp index 0a1306ef..fde4a085 100644 --- a/sleepyhead/sessionbar.cpp +++ b/sleepyhead/sessionbar.cpp @@ -169,7 +169,7 @@ void SessionBar::paintEvent(QPaintEvent *) SegType mn=min(); SegType mx=max(); - if (mx > mn) + if (mx < mn) return; SegType total=mx-mn;