From a026d8d889a58be3c0f012e13057d1ce2fe1aba0 Mon Sep 17 00:00:00 2001 From: Jocke Date: Sat, 28 Jul 2018 17:45:01 +0200 Subject: [PATCH] QlmManager: fix cylinderInit Cylinder init should return all cylinders not only the ones present in the logbook. Signed-off-by: Joakim Bygdell --- mobile-widgets/qmlmanager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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;