From 8e0aed8970ad28b688b12f1ed8209837861548a1 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 28 Sep 2020 19:50:49 +0200 Subject: [PATCH 1/2] Fix entering uncategorized when there's only 1 thing --- nymea-app/ui/delegates/InterfaceTile.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nymea-app/ui/delegates/InterfaceTile.qml b/nymea-app/ui/delegates/InterfaceTile.qml index 65575275..b9b71d69 100644 --- a/nymea-app/ui/delegates/InterfaceTile.qml +++ b/nymea-app/ui/delegates/InterfaceTile.qml @@ -54,7 +54,11 @@ MainPageTile { var page; // Only one item? Go streight to the thing page if (devicesProxy.count === 1) { - page = NymeaUtils.interfaceListToDevicePage([iface.name]); + if (!iface) { + page = "GenericDevicePage.qml"; + } else { + page = NymeaUtils.interfaceListToDevicePage([iface.name]); + } pageStack.push(Qt.resolvedUrl("../devicepages/" + page), {thing: devicesProxy.get(0)}) return; } From 4276336832b61a04876853145ee8a20e397a9007 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 28 Sep 2020 20:30:58 +0200 Subject: [PATCH 2/2] Fix app freeze when trying to select a point on an empty graph --- nymea-app/ui/customviews/GenericTypeGraph.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nymea-app/ui/customviews/GenericTypeGraph.qml b/nymea-app/ui/customviews/GenericTypeGraph.qml index fa5ae35a..0ffacb48 100644 --- a/nymea-app/ui/customviews/GenericTypeGraph.qml +++ b/nymea-app/ui/customviews/GenericTypeGraph.qml @@ -314,7 +314,10 @@ Item { } function markClosestPoint(point) { - var found = false; + if (lineSeries1.count == 0) { + return; + } + if (lineSeries1.count == 1) { selectedHighlights.removePoints(0, selectedHighlights.count) selectedHighlights.append(lineSeries1.at(0).x, lineSeries1.at(1).y)