summaryrefslogtreecommitdiffstats
path: root/libsettings/src/inisettingsobject.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-03-24 15:36:00 +0100
committerPetr Mrázek <peterix@gmail.com>2013-03-24 15:36:00 +0100
commit40570c321069b832722b807227fd8ff9bbd7c10d (patch)
treec29a37baba94726c27ef2c19ab3d81980cb43abb /libsettings/src/inisettingsobject.cpp
parente4f86893a899ee86cfa6d238f891bec04977c966 (diff)
downloadMultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar
MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar.gz
MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar.lz
MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar.xz
MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.zip
Fix settings objects, instances can be started from the GUI now
Diffstat (limited to 'libsettings/src/inisettingsobject.cpp')
-rw-r--r--libsettings/src/inisettingsobject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsettings/src/inisettingsobject.cpp b/libsettings/src/inisettingsobject.cpp
index 75228865..8c4cc89d 100644
--- a/libsettings/src/inisettingsobject.cpp
+++ b/libsettings/src/inisettingsobject.cpp
@@ -32,7 +32,10 @@ void INISettingsObject::changeSetting(const Setting &setting, QVariant value)
{
if (contains(setting.id()))
{
- m_ini.set(setting.configKey(), value);
+ if(value.isValid())
+ m_ini.set(setting.configKey(), value);
+ else
+ m_ini.remove(setting.configKey());
}
}