Skip to content

Commit

Permalink
Add 'show on map' for details view
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfett committed Jan 11, 2012
1 parent 1b0991e commit 5e4d1ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
12 changes: 2 additions & 10 deletions files/advancedcaching/qml/DetailsDefaultPage.qml
Expand Up @@ -178,15 +178,6 @@ Page {
Loader {
id: pageFieldnotes
}
/*Connections {
target: tabDetailsPageStack
onDepthChanged: {
if (tabDetailsPageStack.depth == 1) {
pageDescription.source = "";
pageCoordinates.source = "";
}
}
}*/


function openMenu() {
Expand All @@ -199,7 +190,8 @@ Page {

MenuLayout {
MenuItem { text: "Settings"; onClicked: { showSettings(); } }
MenuItem { text: "Open Website"; onClicked: { Qt.openUrlExternally(currentGeocache.url); } }
MenuItem { text: "Open Website"; onClicked: { Qt.openUrlExternally(currentGeocache.url); } visible: currentGeocache != null }
MenuItem { text: "Show on Map"; onClicked: { tabMap.showOnMap(currentGeocache.lat, currentGeocache.lon); } visible: currentGeocache != null }
}
}
}
6 changes: 6 additions & 0 deletions files/advancedcaching/qml/MapPage.qml
Expand Up @@ -10,6 +10,12 @@ Page {

orientationLock: PageOrientation.LockPortrait

function showOnMap(lat, lon) {
pinchmap.centerLatitude = lat
pinchmap.centerLongitude = lon
tabGroup.currentTab = tabMap
}

PinchMap {
id: pinchmap
width: listPage.width
Expand Down
4 changes: 2 additions & 2 deletions files/advancedcaching/qml/SettingsPage.qml
Expand Up @@ -104,7 +104,7 @@ Page {
color: UI.COLOR_INFOLABEL
text: "Map View"
}

/*
Item {
anchors.left: parent.left
anchors.right: parent.right
Expand All @@ -124,7 +124,7 @@ Page {
checked: settings.optionsMapRotation
anchors.verticalCenter: parent.verticalCenter
}
}
}*/

Item {
anchors.left: parent.left
Expand Down

0 comments on commit 5e4d1ff

Please sign in to comment.