mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 14:13:47 +02:00
fix updateSetting conditionals after merge
This commit is contained in:
parent
62c0aff16a
commit
52ce9af375
1 changed files with 8 additions and 6 deletions
|
@ -277,8 +277,6 @@ void DomainServerSettingsManager::updateSetting(const QString& key, const QJsonV
|
|||
sanitizedValue.prepend('/');
|
||||
}
|
||||
|
||||
qDebug() << "Setting" << key << "in" << settingMap << "to" << sanitizedValue;
|
||||
|
||||
settingMap[key] = sanitizedValue;
|
||||
}
|
||||
}
|
||||
|
@ -328,11 +326,15 @@ void DomainServerSettingsManager::updateSetting(const QString& key, const QJsonV
|
|||
|
||||
updateSetting(sanitizedKey, newValue.toObject()[childKey], thisMap, childDescriptionObject);
|
||||
}
|
||||
}
|
||||
|
||||
if (settingMap[key].toMap().isEmpty()) {
|
||||
// we've cleared all of the settings below this value, so remove this one too
|
||||
settingMap.remove(key);
|
||||
if (settingMap[key].toMap().isEmpty()) {
|
||||
// we've cleared all of the settings below this value, so remove this one too
|
||||
settingMap.remove(key);
|
||||
}
|
||||
} else if (newValue.isArray()) {
|
||||
// we just assume array is replacement
|
||||
// TODO: we still need to recurse here with the description in case values in the array have special types
|
||||
settingMap[key] = newValue.toArray().toVariantList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue