Moved SkipEmptyDays to per Profile preference

This commit is contained in:
Mark Watkins 2011-10-30 19:29:04 +10:00
parent 900631b74b
commit c2c3d3f550
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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();