From 7a36de4865273093b04a853b4df6f9615d018e75 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 5 Mar 2016 07:36:36 +1000 Subject: [PATCH] Fix unintentional leak slider display not initially updating --- sleepyhead/preferencesdialog.cpp | 9 ++------- sleepyhead/preferencesdialog.ui | 6 ++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sleepyhead/preferencesdialog.cpp b/sleepyhead/preferencesdialog.cpp index a450216b..d2370991 100644 --- a/sleepyhead/preferencesdialog.cpp +++ b/sleepyhead/preferencesdialog.cpp @@ -225,13 +225,8 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Profile *_profile) : ui->maskLeaks4Slider->setValue(profile->cpap->custom4cmH2OLeaks()*10.0); ui->maskLeaks20Slider->setValue(profile->cpap->custom20cmH2OLeaks()*10.0); -// if (b) { -// ui->maskLeaks4Label->setText(tr("%1 %2").arg(profile->cpap->custom4cmH2OLeaks(), 5, 'f', 1).arg(STR_UNIT_LPM)); -// ui->maskLeaks20Label->setText(tr("%1 %2").arg(profile->cpap->custom20cmH2OLeaks(), 5, 'f', 1).arg(STR_UNIT_LPM)); -// } else { -// ui->maskLeaks4Label->setText(STR_TR_Default); -// ui->maskLeaks20Label->setText(STR_TR_Default); -// } + ui->maskLeaks4Label->setText(tr("%1 %2").arg(profile->cpap->custom4cmH2OLeaks(), 5, 'f', 1).arg(STR_UNIT_LPM)); + ui->maskLeaks20Label->setText(tr("%1 %2").arg(profile->cpap->custom20cmH2OLeaks(), 5, 'f', 1).arg(STR_UNIT_LPM)); /* QLocale locale=QLocale::system(); QString shortformat=locale.dateFormat(QLocale::ShortFormat); diff --git a/sleepyhead/preferencesdialog.ui b/sleepyhead/preferencesdialog.ui index 1c9a9929..24496c9b 100644 --- a/sleepyhead/preferencesdialog.ui +++ b/sleepyhead/preferencesdialog.ui @@ -783,6 +783,9 @@ If you use a few different masks, pick average values instead. It should still b 48 l/m + + true + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -853,6 +856,9 @@ If you use a few different masks, pick average values instead. It should still b 20 l/m + + true + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter