refactor(color): classes used to manage models and labels, improve duplication UX (#7739)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: Peter Feerick <5500713+pfeerick@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
philmoz
2026-09-25 13:44:12 +10:00
committed by GitHub
co-authored by philmoz Peter Feerick Claude Opus 5.5
parent 61aa7a44c9
commit 6a1cf34079
22 changed files with 2110 additions and 1121 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ bool RadioData::addLabelToModel(int index, QString label)
auto & modelLabelCsv = models[index].labels;
// Make sure it will fit
if (modelLabelCsv.size() + (size_t)label.size() + 1 < modelLabelCsv.capacity()) {
if (modelLabelCsv.size() + (size_t)label.size() + 1 <= modelLabelCsv.capacity()) {
QStringList modelLabels = QString::fromLatin1(modelLabelCsv.c_str()).split(',', Qt::SkipEmptyParts);
if (modelLabels.indexOf(label) == -1) {
modelLabels.append(label);