Fix app freeze when trying to select a point on an empty graph

This commit is contained in:
Michael Zanetti 2020-09-28 20:30:58 +02:00
parent 8e0aed8970
commit 4276336832

View File

@ -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)