mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 8 additions and 2 deletions
|
@ -714,8 +714,14 @@ QString QMLManager::getCylinder(QString diveId)
|
||||||
int dive_id = diveId.toInt();
|
int dive_id = diveId.toInt();
|
||||||
struct dive *d = get_dive_by_uniq_id(dive_id);
|
struct dive *d = get_dive_by_uniq_id(dive_id);
|
||||||
QString cylinder;
|
QString cylinder;
|
||||||
if (d)
|
if (d){
|
||||||
|
if (d->cylinder[1].type.description != NULL){
|
||||||
|
cylinder = "Multiple";
|
||||||
|
}
|
||||||
|
else {
|
||||||
cylinder = d->cylinder[0].type.description;
|
cylinder = d->cylinder[0].type.description;
|
||||||
|
}
|
||||||
|
}
|
||||||
return cylinder;
|
return cylinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue