aboutsummaryrefslogtreecommitdiff
path: root/qmpsettingswindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-03 23:15:41 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-03 23:15:41 +0800
commit84634010422f578b27105bbbaf6b8ee4c1232e86 (patch)
tree022775f88c94d697bdce0b32ae32698c542b50ca /qmpsettingswindow.cpp
parentb886aa1fcafc16fe93bfe19e2f63b4089234f9f6 (diff)
downloadQMidiPlayer-84634010422f578b27105bbbaf6b8ee4c1232e86.tar.xz
Bad Apple. (WTF)
Diffstat (limited to 'qmpsettingswindow.cpp')
-rw-r--r--qmpsettingswindow.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/qmpsettingswindow.cpp b/qmpsettingswindow.cpp
index 1bb7da9..07fcca6 100644
--- a/qmpsettingswindow.cpp
+++ b/qmpsettingswindow.cpp
@@ -23,7 +23,6 @@ qmpSettingsWindow::qmpSettingsWindow(QWidget *parent) :
qmpSettingsWindow::~qmpSettingsWindow()
{
- settings->sync();
delete settings;
delete ui;
}
@@ -31,6 +30,7 @@ qmpSettingsWindow::~qmpSettingsWindow()
void qmpSettingsWindow::closeEvent(QCloseEvent *event)
{
setVisible(false);
+ settings->sync();
emit dialogClosing();
event->accept();
}
@@ -189,8 +189,33 @@ void qmpSettingsWindow::settingsUpdate()
settings->setValue("Behavior/LoadFolder",ui->cbLoadFolder->isChecked()?1:0);
settings->setValue("Behavior/DialogStatus",ui->cbDialogStatus->isChecked()?1:0);
+ if(!ui->cbDialogStatus->isChecked())
+ {
+ settings->remove("DialogStatus/MainW");
+ settings->remove("DialogStatus/PListW");
+ settings->remove("DialogStatus/PListWShown");
+ settings->remove("DialogStatus/ChnlW");
+ settings->remove("DialogStatus/ChnlWShown");
+ settings->remove("DialogStatus/EfxW");
+ settings->remove("DialogStatus/EfxWShown");
+ }
settings->setValue("Behavior/SaveEfxParam",ui->cbSaveEfxParam->isChecked()?1:0);
+ if(!ui->cbSaveEfxParam->isChecked())
+ {
+ settings->remove("Effects/ChorusEnabled");
+ settings->remove("Effects/ReverbEnabled");
+ settings->remove("Effects/ReverbRoom");
+ settings->remove("Effects/ReverbDamp");
+ settings->remove("Effects/ReverbWidth");
+ settings->remove("Effects/ReverbLevel");
+
+ settings->remove("Effects/ChorusFeedbk");
+ settings->remove("Effects/ChorusLevel");
+ settings->remove("Effects/ChorusRate");
+ settings->remove("Effects/ChorusDepth");
+ settings->remove("Effects/ChorusType");
+ }
settings->sync();
}