QML UI: If a dive has multiple cylinders show "Multiple" in the details page
Since we are short on space on the mobile version, lets just show "Multiple" if a dive has multiple cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e0725966b1
commit
5afda93b71
@ -714,8 +714,14 @@ QString QMLManager::getCylinder(QString diveId)
|
||||
int dive_id = diveId.toInt();
|
||||
struct dive *d = get_dive_by_uniq_id(dive_id);
|
||||
QString cylinder;
|
||||
if (d)
|
||||
cylinder = d->cylinder[0].type.description;
|
||||
if (d){
|
||||
if (d->cylinder[1].type.description != NULL){
|
||||
cylinder = "Multiple";
|
||||
}
|
||||
else {
|
||||
cylinder = d->cylinder[0].type.description;
|
||||
}
|
||||
}
|
||||
return cylinder;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user