Skip to content

Commit

Permalink
Reset history listview on bottomedge pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface committed Aug 16, 2014
1 parent 06b6a7f commit a5fcfbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions OSMTouch.qml
Expand Up @@ -355,7 +355,7 @@ MainView {

bottomEdgePageComponent: Page {
id: historyPage
title: i18n.tr('Recent searchs')
title: i18n.tr('Recent places')
anchors.fill: parent

function reset() {
Expand All @@ -373,7 +373,6 @@ MainView {

Component.onCompleted: {
History.init();
reset();
}

ListModel {
Expand Down Expand Up @@ -405,9 +404,14 @@ MainView {
align: Qt.AlignTrailing;
}
}

function onPressed () {
historyPage.reset();
}

}
bottomEdgeTitle: i18n.tr("Recent")

bottomEdgeTitle: i18n.tr("Recent")
}

PageStack {
Expand Down
4 changes: 4 additions & 0 deletions components/PageWithBottomEdge.qml
Expand Up @@ -259,6 +259,10 @@ Page {
tip.hiden = false
hideIndicator.restart()
}

onPressed: {
bottomEdgePage.onPressed();
}
}

state: "collapsed"
Expand Down

0 comments on commit a5fcfbb

Please sign in to comment.