mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-16 01:19:57 +00:00
FIT: remove duplicates from the device infos
There're scenarios where the attached devices get added again, e.g. a power cycle. Filter out the duplicates so each member only gets listed once.
This commit is contained in:
@@ -2830,11 +2830,10 @@ struct FitFileReaderState
|
||||
foreach(int num, unknown_base_type)
|
||||
qDebug() << QString("FitRideFile: unknown base type %1; skipped").arg(num);
|
||||
|
||||
QString deviceInfo;
|
||||
foreach(QString info, deviceInfos) {
|
||||
deviceInfo += info + "\n";
|
||||
}
|
||||
if (deviceInfo.length()>0)
|
||||
QStringList uniqueDevices(deviceInfos.values());
|
||||
uniqueDevices.removeDuplicates();
|
||||
QString deviceInfo = uniqueDevices.join('\n');
|
||||
if (not deviceInfo.isEmpty())
|
||||
rideFile->setTag("Device Info", deviceInfo);
|
||||
|
||||
QString dataInfo;
|
||||
|
||||
Reference in New Issue
Block a user