diff --git a/SleepLib/machine_common.h b/SleepLib/machine_common.h index 83536e64..6306c872 100644 --- a/SleepLib/machine_common.h +++ b/SleepLib/machine_common.h @@ -109,6 +109,7 @@ const QString OXI_SPO2Drop="SPO2Drop"; const QString OXI_Plethy="Plethy"; const QString CPAP_AHI="AHI"; +const QString Journal_Notes="Journal"; #endif // MACHINE_COMMON_H diff --git a/daily.cpp b/daily.cpp index 504c8986..1156dda2 100644 --- a/daily.cpp +++ b/daily.cpp @@ -603,27 +603,27 @@ void Daily::Load(QDate date) ui->webView->setHtml(html); - /*ui->JournalNotes->clear(); + ui->JournalNotes->clear(); Session *journal=GetJournalSession(date); if (journal) { - ui->JournalNotes->setHtml(journal->settings[JOURNAL_Notes].toString()); - }*/ + ui->JournalNotes->setHtml(journal->settings[Journal_Notes].toString()); + } } void Daily::Unload(QDate date) { - /*Session *journal=GetJournalSession(date); + Session *journal=GetJournalSession(date); if (!ui->JournalNotes->toPlainText().isEmpty()) { QString jhtml=ui->JournalNotes->toHtml(); if (journal) { - if (journal->settings[JOURNAL_Notes]!=jhtml) { - journal->settings[JOURNAL_Notes]=jhtml; + if (journal->settings[Journal_Notes]!=jhtml) { + journal->settings[Journal_Notes]=jhtml; journal->SetChanged(true); } } else { journal=CreateJournalSession(date); - journal->settings[JOURNAL_Notes]=jhtml; + journal->settings[Journal_Notes]=jhtml; journal->SetChanged(true); } @@ -631,7 +631,7 @@ void Daily::Unload(QDate date) if (journal) { Machine *jm=profile->GetMachine(MT_JOURNAL); if (jm) jm->SaveSession(journal); - } */ + } UpdateCalendarDay(date); }