summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabcd <amos.choy@nokia.com>2011-12-12 13:40:16 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-13 07:28:40 +0100
commitc7b8dc0f2ddcff41b46d1b15b0904283c05cab85 (patch)
tree8115b63ff006033fbaf5abe58015d8458897d95c
parentefd322b77b76f1bfa75b7f2d4bb572b0e469484e (diff)
downloadqtlocation-c7b8dc0f2ddcff41b46d1b15b0904283c05cab85.tar.gz
Transition back to search list when a place is removed.
Change-Id: Ie73c4699b6daf1099dcb58e47d142365684b59a9 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
-rw-r--r--examples/declarative/places/content/places/SearchResultView.qml17
1 files changed, 11 insertions, 6 deletions
diff --git a/examples/declarative/places/content/places/SearchResultView.qml b/examples/declarative/places/content/places/SearchResultView.qml
index 60182bb6..788c76d6 100644
--- a/examples/declarative/places/content/places/SearchResultView.qml
+++ b/examples/declarative/places/content/places/SearchResultView.qml
@@ -50,6 +50,12 @@ Item {
ListView {
id: view
+ function showSearchResults() {
+ view.currentIndex = 0;
+ placeContentList.source = "";
+ placeContentList.place = null;
+ }
+
orientation: ListView.Horizontal
interactive: false
anchors.fill: parent
@@ -122,11 +128,7 @@ Item {
hoveredSource: "../../resources/left_hovered.png"
pressedSource: "../../resources/left_pressed.png"
- onClicked: {
- view.currentIndex = 0;
- placeContentList.source = "";
- placeContentList.place = null;
- }
+ onClicked: view.showSearchResults()
}
PlaceDelegate {
@@ -172,7 +174,10 @@ Item {
page.state = "EditPlace"
}
- onDeletePlace: place.remove();
+ onDeletePlace: {
+ place.remove();
+ view.showSearchResults();
+ }
}
}
Item {