@@ -22,6 +22,7 @@ import "../Components/ListItems" as ListItems
22ScopeView {
22ScopeView {
23 id: scopeView
23 id: scopeView
24 readonly property alias previewShown: previewLoader.onScreen
24 readonly property alias previewShown: previewLoader.onScreen
25+ property bool enableHeightBehaviorOnNextCreation: false
26 onIsCurrentChanged: {
27 onIsCurrentChanged: {
27 pageHeader.resetSearch();
28 pageHeader.resetSearch();
@@ -85,10 +86,12 @@ ScopeView {
85 source: getRenderer(model.renderer, model.contentType)
86 source: getRenderer(model.renderer, model.contentType)
87 onLoaded: {
88 onLoaded: {
89+ if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviourOnNextCreation !== undefined) {
90+ item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
91+ scopeView.enableHeightBehaviorOnNextCreation = false;
88 if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
93 if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
89 // TODO: the running apps grid doesn't support standard scope results model yet
94 // TODO: the running apps grid doesn't support standard scope results model yet
90− item.enableHeightBehavior = enableHeightBehavior;
91− enableHeightBehavior = false;
92 item.firstModel = Qt.binding(function() { return results.firstModel })
95 item.firstModel = Qt.binding(function() { return results.firstModel })
93 item.secondModel = Qt.binding(function() { return results.secondModel })
96 item.secondModel = Qt.binding(function() { return results.secondModel })
@@ -104,8 +107,8 @@ ScopeView {
106 Component.onDestruction: {
109 Component.onDestruction: {
107− if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
110+ if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviourOnNextCreation !== undefined) {
108− enableHeightBehavior = (item.firstModel.count + item.secondModel.count == 0)
111+ scopeView.enableHeightBehaviorOnNextCreation = item.enableHeightBehaviourOnNextCreation;