on xenial help sign in
Clear the dash navigation models on search clear
commita1472031e33b7f2870195d5f016a5987e08d21ca authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 25 Sep 2015, 15:33 (11 years ago) parent5444515
3 files changed+8−1
qml/Dash/DashNavigation.qml+3−1 qml/Dash/GenericScopeView.qml+1 qml/Dash/PageHeaderExtraPanel.qml+4
qml/Dash/DashNavigation.qml+3−1
@@ -210,8 +210,10 @@ Item {
210210 }
211211
212212 property bool isFirstLoad: false
213− onScopeChanged: {
213+ onScopeChanged: clear();
214+ function clear() {
214215 navigationModel.clear();
216+ headersModel.clear();
215217 isFirstLoad = true;
216218 }
217219 function setNewNavigation() {
qml/Dash/GenericScopeView.qml+1
@@ -638,6 +638,7 @@ FocusScope {
638638 onClearSearch: {
639639 resetSearch(keepPanelOpen);
640640 scopeView.scope.resetPrimaryNavigationTag();
641+ peExtraPanel.resetNavigation();
641642 if (keepPanelOpen) {
642643 openPopup();
643644 }
qml/Dash/PageHeaderExtraPanel.qml+4
@@ -37,6 +37,10 @@ Item {
3737 signal historyItemClicked(string text)
3838 signal dashNavigationLeafClicked()
3939
40+ function resetNavigation() {
41+ dashNavigation.clear();
42+ }
43+
4044 Rectangle {
4145 color: "white"
4246 anchors.fill: parent