Merge PR #215: Always initialize device settings params
This commit is contained in:
commit
c066962a66
@ -1207,6 +1207,13 @@ void DeviceManagerImplementation::loadConfiguredDevices()
|
||||
}
|
||||
}
|
||||
DeviceUtils::verifyParams(deviceClass.settingsTypes(), deviceSettings);
|
||||
// Make sure all settings are around. if they aren't initialize with default values
|
||||
foreach (const ParamType &settingsType, deviceClass.settingsTypes()) {
|
||||
if (!deviceSettings.hasParam(settingsType.id())) {
|
||||
deviceSettings.append(Param(settingsType.id(), settingsType.defaultValue().isValid() ? settingsType.defaultValue() : ""));
|
||||
}
|
||||
}
|
||||
|
||||
device->setSettings(deviceSettings);
|
||||
|
||||
settings.endGroup(); // Settings
|
||||
|
||||
Reference in New Issue
Block a user