From 3749a73fd17f19b6e9fa1c6990b4e25c93d47d49 Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Wed, 25 Mar 2020 19:17:39 -0400 Subject: [PATCH] Update channel LOOKUP data type to show unspecified options as integers. --- oscar/daily.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oscar/daily.cpp b/oscar/daily.cpp index b93d9112..e57b6444 100644 --- a/oscar/daily.cpp +++ b/oscar/daily.cpp @@ -1128,7 +1128,11 @@ QString Daily::getMachineSettings(Day * day) { QString data; if (chan.datatype() == schema::LOOKUP) { - data = chan.option(it.value().toInt()); + int value = it.value().toInt(); + data = chan.option(value); + if (data.isEmpty()) { + data = QString().number(value) + " " + chan.units();; + } } else if (chan.datatype() == schema::BOOL) { data = (it.value().toBool() ? STR_TR_Yes : STR_TR_No); } else if (chan.datatype() == schema::DOUBLE) {