From 452a1a4d5784cfc191485f4e77133ef3090ee693 Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Sun, 27 Nov 2022 20:25:43 +0000 Subject: changes to compass, overlays and waypoints a very messy commit: - add waypoints to show up on the map - fix compass to work correctly - fix centering of buttons on flat tyre watches --- src/SetPointPage.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/SetPointPage.qml') diff --git a/src/SetPointPage.qml b/src/SetPointPage.qml index 50643b0..c2e8787 100644 --- a/src/SetPointPage.qml +++ b/src/SetPointPage.qml @@ -35,7 +35,7 @@ Item { height: parent.width*0.2 //for the default text, we probably want a date/time previewText: "Waypoint name" - text: Date().toLocaleString(Locale.ShortFormat) + text: Date.toLocaleString(Locale.ShortFormat) } ListView { id: iconSelectorView @@ -89,8 +89,11 @@ Item { } function appendWayPoint() { //the colours.primary is currently a placeholder. it would be nice to let users select colours, but I CBA to write a colour picker right now. - var newWayPointString = ">" + "selectedIcon" + ";" + coord + ";" + colours.primary + ";" + textBox.text + ";" + Date() + var newWayPointString = selectedIcon + ";" + coord.latitude + "," + coord.longitude + ";" + colours.primary + ";" + textBox.text + ";" + Date.now() + ">" console.log(newWayPointString) - pageStack.pop() + waypointList.value = waypointList.value + newWayPointString + setPointControls.visible = false + mapControls.visible = true + pageStack.pop(pageStack.currentLayer) } } -- cgit v1.2.3-54-g00ecf