diff --git a/application/pagedialog/PageDialog.cpp b/application/pagedialog/PageDialog.cpp index a930789ed..c2b480cfd 100644 --- a/application/pagedialog/PageDialog.cpp +++ b/application/pagedialog/PageDialog.cpp @@ -54,9 +54,12 @@ PageDialog::PageDialog(BasePageProviderPtr pageProvider, QString defaultId, QWid void PageDialog::closeEvent(QCloseEvent *event) { + qDebug() << "Paged dialog close requested"; if (m_container->requestClose(event)) { + qDebug() << "Paged dialog close approved"; MMC->settings()->set("PagedGeometry", saveGeometry().toBase64()); + qDebug() << "Paged dialog geometry saved"; QDialog::closeEvent(event); } } diff --git a/application/pages/InstanceSettingsPage.cpp b/application/pages/InstanceSettingsPage.cpp index 3dc79688a..296de379f 100644 --- a/application/pages/InstanceSettingsPage.cpp +++ b/application/pages/InstanceSettingsPage.cpp @@ -37,6 +37,8 @@ bool InstanceSettingsPage::apply() void InstanceSettingsPage::applySettings() { + SettingsObject::Lock lock(m_settings); + // Console bool console = ui->consoleSettingsBox->isChecked(); m_settings->set("OverrideConsole", console); diff --git a/application/pages/global/ExternalToolsPage.cpp b/application/pages/global/ExternalToolsPage.cpp index 426432a0c..66d91a467 100644 --- a/application/pages/global/ExternalToolsPage.cpp +++ b/application/pages/global/ExternalToolsPage.cpp @@ -61,6 +61,9 @@ void ExternalToolsPage::loadSettings() void ExternalToolsPage::applySettings() { auto s = MMC->settings(); + + SettingsObject::Lock lock(s); + s->set("JProfilerPath", ui->jprofilerPathEdit->text()); s->set("JVisualVMPath", ui->jvisualvmPathEdit->text()); s->set("MCEditPath", ui->mceditPathEdit->text()); diff --git a/application/pages/global/JavaPage.cpp b/application/pages/global/JavaPage.cpp index d201bb2f4..474d73d64 100644 --- a/application/pages/global/JavaPage.cpp +++ b/application/pages/global/JavaPage.cpp @@ -58,6 +58,9 @@ bool JavaPage::apply() void JavaPage::applySettings() { auto s = MMC->settings(); + + SettingsObject::Lock lock(s); + // Memory s->set("MinMemAlloc", ui->minMemSpinBox->value()); s->set("MaxMemAlloc", ui->maxMemSpinBox->value()); diff --git a/application/pages/global/MinecraftPage.cpp b/application/pages/global/MinecraftPage.cpp index 57f40ae62..c08f9140f 100644 --- a/application/pages/global/MinecraftPage.cpp +++ b/application/pages/global/MinecraftPage.cpp @@ -62,6 +62,8 @@ void MinecraftPage::applySettings() { auto s = MMC->settings(); + SettingsObject::Lock lock(s); + // Window Size s->set("LaunchMaximized", ui->maximizedCheckBox->isChecked()); s->set("MinecraftWinWidth", ui->windowWidthSpinBox->value()); diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp index 348d08aef..1517b6e9b 100644 --- a/application/pages/global/MultiMCPage.cpp +++ b/application/pages/global/MultiMCPage.cpp @@ -247,6 +247,9 @@ void MultiMCPage::refreshUpdateChannelDesc() void MultiMCPage::applySettings() { auto s = MMC->settings(); + + SettingsObject::Lock lock(s); + // Language s->set("Language", ui->languageBox->itemData(ui->languageBox->currentIndex()).toLocale().bcp47Name()); diff --git a/application/pages/global/ProxyPage.cpp b/application/pages/global/ProxyPage.cpp index f18f70491..f998fb4bf 100644 --- a/application/pages/global/ProxyPage.cpp +++ b/application/pages/global/ProxyPage.cpp @@ -57,6 +57,8 @@ void ProxyPage::applySettings() { auto s = MMC->settings(); + SettingsObject::Lock lock(s); + // Proxy QString proxyType = "None"; if (ui->proxyDefaultBtn->isChecked())