DDF don't overwrite legacy values with default value if already set
@@ -83,9 +83,12 @@ static ResourceItem *DEV_InitDeviceDescriptionItem(const DeviceDescription::Item
item->setTimeStamps(QDateTime::fromMSecsSinceEpoch(dbItem->timestampMs));
}
else if (ddfItem.defaultValue.isValid())
+ {
+ if (!item->lastSet().isValid())
{
item->setValue(ddfItem.defaultValue);
}
+ }
assert(ddfItem.handle != DeviceDescription::Item::InvalidItemHandle);
item->setDdfItemHandle(ddfItem.handle);
