summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-07-23 07:52:47 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-07-23 10:07:01 (GMT)
commitf995bb5a36b4f942a4315e512fd0d6a6245c64d0 (patch)
treec1dc5db46aef279eb9bdc1decc9e16addba0871f
parent3471752a13dfb9ce4c368f6437911ed854f949d1 (diff)
Show coordinate and address if there is no name
-rw-r--r--src/apps/marble-maps/PlacemarkDialog.qml19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/apps/marble-maps/PlacemarkDialog.qml b/src/apps/marble-maps/PlacemarkDialog.qml
index 5026de3..dea9d8a 100644
--- a/src/apps/marble-maps/PlacemarkDialog.qml
+++ b/src/apps/marble-maps/PlacemarkDialog.qml
@@ -56,6 +56,7 @@ Item {
}
IconText {
+ id: name
width: parent.width
text: placemark === null ? "" : placemark.name
maximumLineCount: 2
@@ -77,44 +78,46 @@ Item {
IconText {
width: parent.width
- visible: !condensed
+ visible: text.length > 0 && (!condensed || name.text === "")
text: placemark === null ? "" : placemark.address
maximumLineCount: 4
}
IconText {
width: parent.width
- visible: placemark !== null && placemark.website !== ""
- text: placemark === null ? "" : "<a href=\"" + placemark.website + "\">" + placemark.website + "</a>"
+ visible: url.length > 0
+ property string url: placemark === null ? "" : placemark.website
+ text: "<a href=\"" + url + "\">" + url + "</a>"
icon: "qrc:/material/browser.svg"
maximumLineCount: 4
}
IconText {
width: parent.width
- visible: placemark !== null && placemark.wikipedia !== ""
- text: placemark === null ? "" : "<a href=\"" + placemark.wikipedia + "\">Wikipedia</a>"
+ visible: url.length > 0
+ property string url: placemark === null ? "" : placemark.wikipedia
+ text: "<a href=\"" + url + "\">Wikipedia</a>"
icon: "qrc:/material/browser.svg"
maximumLineCount: 4
}
IconText {
width: parent.width
- visible: placemark !== null && placemark.fuelDetails !== ""
+ visible: text.length > 0
text: placemark === null ? "" : placemark.fuelDetails
icon: "qrc:/material/gas_station.svg"
}
IconText {
width: parent.width
- visible: placemark !== null && placemark.openingHours !== ""
+ visible: text.length > 0
text: placemark === null ? "" : placemark.openingHours
icon: "qrc:/material/access_time.svg"
}
IconText {
width: parent.width
- visible: !condensed
+ visible: text.length > 0 && (!condensed || name.text === "")
text: placemark === null ? "" : placemark.coordinates
icon: "qrc:/material/place.svg"
}