Merge PR #446: Fix app freeze when selecting a point in an empty graph
This commit is contained in:
commit
25399c40f7
@ -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)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user