From aec02b14aa44ab156b197ed5c659f0ec73de8a52 Mon Sep 17 00:00:00 2001 From: kappa44 <6469032-kappa44@users.noreply.gitlab.com> Date: Tue, 11 May 2021 14:48:14 +1000 Subject: [PATCH] Fix bookmark behavior with clock drift --- Htmldocs/release_notes.html | 1 + oscar/daily.cpp | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Htmldocs/release_notes.html b/Htmldocs/release_notes.html index 56808409..4aecefb3 100644 --- a/Htmldocs/release_notes.html +++ b/Htmldocs/release_notes.html @@ -46,6 +46,7 @@
Changes and fixes in OSCAR v1.2.0
diff --git a/oscar/daily.cpp b/oscar/daily.cpp
index 8511a362..88aeda70 100644
--- a/oscar/daily.cpp
+++ b/oscar/daily.cpp
@@ -1912,17 +1912,18 @@ void Daily::Load(QDate date)
ui->bookmarkTable->blockSignals(true);
-
+ // Careful with drift here - apply to the label but not the
+ // stored data (which will be saved if journal changes occur).
qint64 clockdrift=p_profile->cpap->clockDrift()*1000L,drift;
Day * dday=p_profile->GetDay(previous_date,MT_CPAP);
drift=(dday!=nullptr) ? clockdrift : 0;
bool ok;
for (int i=0;i