summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-26 08:14:33 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-26 08:14:33 +0200
commitc1c23e47a74b585e7dce211d2416a4a80ba17f25 (patch)
treeef6a09a034f7fe2a8356a809434b76d54c8a5d06 /application
parent8fb5d4add3cbbd5a4c1d4cd32ddab67fda458afa (diff)
downloadMultiMC-c1c23e47a74b585e7dce211d2416a4a80ba17f25.tar
MultiMC-c1c23e47a74b585e7dce211d2416a4a80ba17f25.tar.gz
MultiMC-c1c23e47a74b585e7dce211d2416a4a80ba17f25.tar.lz
MultiMC-c1c23e47a74b585e7dce211d2416a4a80ba17f25.tar.xz
MultiMC-c1c23e47a74b585e7dce211d2416a4a80ba17f25.zip
GH-1003 Fix settings dialog delays
Diffstat (limited to 'application')
-rw-r--r--application/MainWindow.cpp7
-rw-r--r--application/pages/global/ExternalToolsPage.cpp2
-rw-r--r--application/pages/global/JavaPage.cpp2
-rw-r--r--application/pages/global/MinecraftPage.cpp2
-rw-r--r--application/pages/global/MultiMCPage.cpp2
-rw-r--r--application/pages/global/ProxyPage.cpp2
6 files changed, 5 insertions, 12 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 1409a924..6c5aa3af 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -1382,8 +1382,11 @@ void ShowPageDialog(T raw_provider, QWidget * parent, QString open_page = QStrin
auto provider = std::dynamic_pointer_cast<BasePageProvider>(raw_provider);
if(!provider)
return;
- PageDialog dlg(provider, open_page, parent);
- dlg.exec();
+ {
+ SettingsObject::Lock lock(MMC->settings());
+ PageDialog dlg(provider, open_page, parent);
+ dlg.exec();
+ }
}
void ShowInstancePageDialog(InstancePtr instance, QWidget * parent, QString open_page = QString())
diff --git a/application/pages/global/ExternalToolsPage.cpp b/application/pages/global/ExternalToolsPage.cpp
index 66d91a46..26b2f31e 100644
--- a/application/pages/global/ExternalToolsPage.cpp
+++ b/application/pages/global/ExternalToolsPage.cpp
@@ -62,8 +62,6 @@ 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 474d73d6..9b35d1f3 100644
--- a/application/pages/global/JavaPage.cpp
+++ b/application/pages/global/JavaPage.cpp
@@ -59,8 +59,6 @@ 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 c08f9140..57f40ae6 100644
--- a/application/pages/global/MinecraftPage.cpp
+++ b/application/pages/global/MinecraftPage.cpp
@@ -62,8 +62,6 @@ 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 1517b6e9..65f258b5 100644
--- a/application/pages/global/MultiMCPage.cpp
+++ b/application/pages/global/MultiMCPage.cpp
@@ -248,8 +248,6 @@ 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 f998fb4b..f18f7049 100644
--- a/application/pages/global/ProxyPage.cpp
+++ b/application/pages/global/ProxyPage.cpp
@@ -57,8 +57,6 @@ void ProxyPage::applySettings()
{
auto s = MMC->settings();
- SettingsObject::Lock lock(s);
-
// Proxy
QString proxyType = "None";
if (ui->proxyDefaultBtn->isChecked())