(cpn) Labels - Various fixes
Don't allow duplicate Partial labels of others also selected Paste doesn't update labels list
This commit is contained in:
@@ -283,20 +283,17 @@ bool LabelsStorageFormat::loadYaml(RadioData & radioData)
|
||||
radioData.generalSettings.currModelIndex = modelIdx;
|
||||
}
|
||||
|
||||
if (hasLabels) {
|
||||
QStringList labels = QString(model.labels).split(',',QString::SkipEmptyParts);
|
||||
foreach(QString label, labels) {
|
||||
radioData.addLabel(label);
|
||||
}
|
||||
}
|
||||
|
||||
model.used = true;
|
||||
modelIdx++;
|
||||
}
|
||||
|
||||
// If no labels, add a Favorites
|
||||
if(hasLabels && !radioData.labels.size()) {
|
||||
radioData.labels.append(tr("Favorites"));
|
||||
// Add the labels in the models
|
||||
if (hasLabels) {
|
||||
radioData.addLabelsFromModels();
|
||||
|
||||
// If no labels, add a Favorites
|
||||
if(!radioData.labels.size())
|
||||
radioData.labels.append(tr("Favorites"));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user