From c2c3d3f55044e09d9862c010af81cb0b01aae059 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 30 Oct 2011 19:29:04 +1000 Subject: [PATCH] Moved SkipEmptyDays to per Profile preference --- daily.cpp | 4 ++-- preferencesdialog.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daily.cpp b/daily.cpp index 665dd456..5bc39817 100644 --- a/daily.cpp +++ b/daily.cpp @@ -856,7 +856,7 @@ void Daily::on_JournalNotesUnderline_clicked() void Daily::on_prevDayButton_clicked() { - if (!PREF.ExistsAndTrue("SkipEmptyDays")) { + if (!PROFILE.ExistsAndTrue("SkipEmptyDays")) { LoadDate(previous_date.addDays(-1)); } else { QDate d=previous_date; @@ -872,7 +872,7 @@ void Daily::on_prevDayButton_clicked() void Daily::on_nextDayButton_clicked() { - if (!PREF.ExistsAndTrue("SkipEmptyDays")) { + if (!PROFILE.ExistsAndTrue("SkipEmptyDays")) { LoadDate(previous_date.addDays(1)); } else { QDate d=previous_date; diff --git a/preferencesdialog.cpp b/preferencesdialog.cpp index 88a3a8ec..953df5e1 100644 --- a/preferencesdialog.cpp +++ b/preferencesdialog.cpp @@ -66,8 +66,8 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) : ui->bigFontBold->setChecked(bigfont->weight()==QFont::Bold); ui->bigFontItalic->setChecked(bigfont->italic()); - if (!PREF.Exists("SkipEmptyDays")) PREF["SkipEmptyDays"]=true; - ui->skipEmptyDays->setChecked(PREF["SkipEmptyDays"].toBool()); + if (!(*profile).Exists("SkipEmptyDays")) (*profile)["SkipEmptyDays"]=true; + ui->skipEmptyDays->setChecked((*profile)["SkipEmptyDays"].toBool()); if (!PREF.Exists("Updates_AutoCheck")) PREF["Updates_AutoCheck"]=true; ui->automaticallyCheckUpdates->setChecked(PREF["Updates_AutoCheck"].toBool()); @@ -196,7 +196,7 @@ void PreferencesDialog::Save() (*profile)["SyncOximetry"]=ui->oximetrySync->isChecked(); (*profile)["OximeterType"]=ui->oximetryType->currentText(); - PREF["SkipEmptyDays"]=ui->skipEmptyDays->isChecked(); + (*profile)["SkipEmptyDays"]=ui->skipEmptyDays->isChecked(); PREF["Updates_AutoCheck"]=ui->automaticallyCheckUpdates->isChecked(); PREF["Updates_CheckFrequency"]=ui->updateCheckEvery->value();