on xenial help sign in
Clear the dash navigation models on search clear
a147203Albert Astals Cid
qml/Dash/DashNavigation.qml+3−1
@@ -210,8 +210,10 @@ Item {
210 }
210 }
211
211
212 property bool isFirstLoad: false
212 property bool isFirstLoad: false
213− onScopeChanged: {
213+ onScopeChanged: clear();
214+ function clear() {
214 navigationModel.clear();
215 navigationModel.clear();
216+ headersModel.clear();
215 isFirstLoad = true;
217 isFirstLoad = true;
216 }
218 }
217 function setNewNavigation() {
219 function setNewNavigation() {
qml/Dash/GenericScopeView.qml+1
@@ -638,6 +638,7 @@ FocusScope {
638 onClearSearch: {
638 onClearSearch: {
639 resetSearch(keepPanelOpen);
639 resetSearch(keepPanelOpen);
640 scopeView.scope.resetPrimaryNavigationTag();
640 scopeView.scope.resetPrimaryNavigationTag();
641+ peExtraPanel.resetNavigation();
641 if (keepPanelOpen) {
642 if (keepPanelOpen) {
642 openPopup();
643 openPopup();
643 }
644 }
qml/Dash/PageHeaderExtraPanel.qml+4
@@ -37,6 +37,10 @@ Item {
37 signal historyItemClicked(string text)
37 signal historyItemClicked(string text)
38 signal dashNavigationLeafClicked()
38 signal dashNavigationLeafClicked()
39
39
40+ function resetNavigation() {
41+ dashNavigation.clear();
42+ }
43+
40 Rectangle {
44 Rectangle {
41 color: "white"
45 color: "white"
42 anchors.fill: parent
46 anchors.fill: parent