Merge lp:~costales/unav/0.60-nik-conv2-coord-georeverse into lp:unav

Proposed by costales
Status: Merged
Merged at revision: 70
Proposed branch: lp:~costales/unav/0.60-nik-conv2-coord-georeverse
Merge into: lp:unav
Prerequisite: lp:~nik90/unav/unav-convergence-part-2
Diff against target: 43 lines (+7/-7)
1 file modified
qml/PoiDetailsPage.qml (+7/-7)
To merge this branch: bzr merge lp:~costales/unav/0.60-nik-conv2-coord-georeverse
Reviewer Review Type Date Requested Status
uNav developers Pending
Review via email: mp+294716@code.launchpad.net

Description of the change

If you click on map, the coordinate of Details page is the georeverse. It should be the POI, because if not, you will not share or add that real POI.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/PoiDetailsPage.qml'
2--- qml/PoiDetailsPage.qml 2016-04-28 16:07:19 +0000
3+++ qml/PoiDetailsPage.qml 2016-05-14 18:14:22 +0000
4@@ -69,12 +69,12 @@
5 website.title = poiDetailsModel.get(0).website
6 internet.title = poiDetailsModel.get(0).internet_access
7 wheelchair.title = poiDetailsModel.get(0).wheelchair
8- lat = poiDetailsModel.get(0).lat
9- lng = poiDetailsModel.get(0).lng
10+ lat = parseFloat(mainPageStack.clickedLat)
11+ lng = parseFloat(mainPageStack.clickedLng)
12
13 distance = QmlJs.formatDistance(QmlJs.calcPoiDistance(mainPageStack.currentLat, mainPageStack.currentLng, lat, lng, 10), navApp.settings.unit)
14
15- coordinates.title = "%1 %2, %3 %4".arg(i18n.tr("Lat, Long:")).arg(parseFloat(lat).toFixed(6)).arg(parseFloat(lng).toFixed(6)).arg((distance ? '| '+distance : ''))
16+ coordinates.title = "%1 %2, %3 %4".arg(i18n.tr("Lat, Long:")).arg(parseFloat(lat).toFixed(5)).arg(parseFloat(lng).toFixed(5)).arg((distance ? '| '+distance : ''))
17
18 // Internet access values returned by OSM are (yes, no, wlan, terminal and wired) which
19 // are too short and not translated. They are converted to meaningful phrases and also
20@@ -199,9 +199,9 @@
21 }
22 mainPageStack.center_onpos = 2;
23 mainPageStack.routeState = 'yes'
24- mainPageStack.executeJavaScript("calc2coord("+ poiDetailsModel.lat + "," + poiDetailsModel.lng + ");");
25+ mainPageStack.executeJavaScript("calc2coord("+ mainPageStack.clickedLat + "," + mainPageStack.clickedLng + ");");
26 } else if (model.mode === "SAVE") {
27- var incubator = mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("SearchPage.qml"), {favLat: poiDetailsModel.lat, favLng: poiDetailsModel.lng, favName: poiName});
28+ var incubator = mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("SearchPage.qml"), {favLat: mainPageStack.clickedLat, favLng: mainPageStack.clickedLng, favName: poiName});
29 if (incubator && incubator.status == Component.Loading) {
30 incubator.onStatusChanged = function(status) {
31 if (status == Component.Ready) {
32@@ -210,9 +210,9 @@
33 }
34 }
35 } else if (model.mode === "SHARE") {
36- mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("Share.qml"), {"lat": poiDetailsModel.lat, "lon": poiDetailsModel.lng})
37+ mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("Share.qml"), {"lat": mainPageStack.clickedLat, "lon": mainPageStack.clickedLng})
38 } else if (model.mode === "NEARBY") {
39- mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("PoiPage.qml"), {"lat": poiDetailsModel.lat, "lng": poiDetailsModel.lng})
40+ mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("PoiPage.qml"), {"lat": mainPageStack.clickedLat, "lng": mainPageStack.clickedLng})
41 } else if (model.mode === "PTFROM") {
42 if (mainPageStack.columns === 1) {
43 mainPageStack.removePages(mainPageStack.primaryPage)

Subscribers

People subscribed via source and target branches