mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
IconManager - Use normalized values for Sport
To match getFilepath using RideItem::sport, which is the normalized Sport value.
This commit is contained in:
@@ -117,10 +117,12 @@ void
|
||||
IconManager::assignIcon
|
||||
(const QString &field, const QString &value, const QString &filename)
|
||||
{
|
||||
// Normalize Sport values
|
||||
QString normValue = field == "Sport" ? RideFile::sportTag(value) : value;
|
||||
if (! filename.isEmpty()) {
|
||||
icons[field][value] = filename;
|
||||
icons[field][normValue] = filename;
|
||||
} else if (icons.contains(field)) {
|
||||
icons[field].remove(value);
|
||||
icons[field].remove(normValue);
|
||||
}
|
||||
saveConfig();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user