diff options
author | Jocke <j.bygdell@gmail.com> | 2018-07-28 17:45:01 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-11 11:19:07 -0700 |
commit | a026d8d889a58be3c0f012e13057d1ce2fe1aba0 (patch) | |
tree | 72d1b72f665f646f54ff10e2ea52bfeb2fbcb631 /mobile-widgets | |
parent | ae70a751c7b5292ed4a798601d17013479508d86 (diff) | |
download | subsurface-a026d8d889a58be3c0f012e13057d1ce2fe1aba0.tar.gz |
QlmManager: fix cylinderInit
Cylinder init should return all cylinders not only the ones present in the logbook.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 2e3576596..1e62cf0ca 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1612,6 +1612,14 @@ QStringList QMLManager::cylinderInit() const cylinders << d->cylinder[j].type.description; } } + + for (unsigned long ti = 0; ti < MAX_TANK_INFO && tank_info[ti].name != NULL; ti++) { + QString cyl = tank_info[ti].name; + if (cyl == "") + continue; + cylinders << cyl; + } + cylinders.removeDuplicates(); cylinders.sort(); return cylinders; |