on xenial help sign in
Move this code up to Dash.qml too
fb554b3Albert Astals
qml/Dash/Dash.qml+5
@@ -62,6 +62,11 @@ Showable {
62 id: filteredScopes
62 id: filteredScopes
63 model: Scopes {
63 model: Scopes {
64 id: scopes
64 id: scopes
65+ onLoadedChanged: {
66+ if (loaded) {
67+ scopesOverview.scope = scopes.getScope("scopesOverview");
68+ }
69+ }
65 }
70 }
66 dynamicSortFilter: true
71 dynamicSortFilter: true
67
72
qml/Dash/DashContent.qml+4−7
@@ -38,12 +38,9 @@ Item {
38 Connections {
38 Connections {
39 target: scopes
39 target: scopes
40 onLoadedChanged: {
40 onLoadedChanged: {
41− if (scopes.loaded) {
42− if (set_current_index != undefined) {
41+ if (scopes.loaded && set_current_index != undefined) {
43− setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
42+ setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
44− set_current_index = undefined;
43+ set_current_index = undefined;
45− }
46− scopesOverview.scope = scopes.getScope("scopesOverview");
47 }
44 }
48 }
45 }
49 }
46 }
@@ -114,7 +111,7 @@ Item {
114 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
111 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
115 cacheBuffer: 1073741823
112 cacheBuffer: 1073741823
116 onMovementStarted: currentItem.item.showHeader();
113 onMovementStarted: currentItem.item.showHeader();
117− clip: parent.x != 0 || parent.scale != 1
114+ clip: parent.x != 0
118
115
119 // If the number of items is less than the current index, then need to reset to another item.
116 // If the number of items is less than the current index, then need to reset to another item.
120 onCountChanged: {
117 onCountChanged: {