Merge pull request #14069 from spowelljr/invalidClusters

GUI: Mark invalid clusters in table list
pull/14071/head
Steven Powell 2022-04-28 14:07:32 -07:00 committed by GitHub
commit b67d897d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 7 deletions

View File

@ -422,16 +422,19 @@ void Window::updateClusterList()
continue;
}
QJsonObject par = json.object();
QJsonArray a = par["valid"].toArray();
QJsonArray b = par["invalid"].toArray();
for (int i = 0; i < b.size(); i++) {
a.append(b[i]);
}
for (int i = 0; i < a.size(); i++) {
QJsonObject obj = a[i].toObject();
QJsonArray valid = par["valid"].toArray();
QJsonArray invalid = par["invalid"].toArray();
for (int i = 0; i < valid.size(); i++) {
QJsonObject obj = valid[i].toObject();
Cluster cluster = createClusterObject(obj);
clusters << cluster;
}
for (int i = 0; i < invalid.size(); i++) {
QJsonObject obj = invalid[i].toObject();
Cluster cluster = createClusterObject(obj);
cluster.setStatus("Invalid");
clusters << cluster;
}
}
clusterList = clusters;
}