From 7331365d2c55b86d59ed8c32c39145e5f4541202 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Sun, 19 Mar 2017 10:08:52 -0700 Subject: [PATCH] Remove unused code --- src/FlightMap/FlightMap.qml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/FlightMap/FlightMap.qml b/src/FlightMap/FlightMap.qml index 6204540d57..5f689620ed 100644 --- a/src/FlightMap/FlightMap.qml +++ b/src/FlightMap/FlightMap.qml @@ -56,32 +56,6 @@ Map { return dist } - function calculateScale() { - var coord1, coord2, dist, text, f - f = 0 - coord1 = _map.toCoordinate(Qt.point(0, scale.y)) - coord2 = _map.toCoordinate(Qt.point(0 + scaleImage.sourceSize.width, scale.y)) - dist = Math.round(coord1.distanceTo(coord2)) - if (dist === 0) { - // not visible - } else { - for (var i = 0; i < scaleLengths.length - 1; i++) { - if (dist < (scaleLengths[i] + scaleLengths[i+1]) / 2 ) { - f = scaleLengths[i] / dist - dist = scaleLengths[i] - break; - } - } - if (f === 0) { - f = dist / scaleLengths[i] - dist = scaleLengths[i] - } - } - text = formatDistance(dist) - scaleImage.width = (scaleImage.sourceSize.width * f) - 2 * scaleImageLeft.sourceSize.width - scaleText.text = text - } - function setVisibleRegion(region) { // This works around a bug on Qt where if you set a visibleRegion and then the user moves or zooms the map // and then you set the same visibleRegion the map will not move/scale appropriately since it thinks there -- GitLab