@@ -22,6 +22,7 @@ import "../Components/ListItems" as ListItems
2222ScopeView {
2323 id: scopeView
2424 readonly property alias previewShown: previewLoader.onScreen
25+ property bool enableHeightBehaviorOnNextCreation: false
2526
2627 onIsCurrentChanged: {
2728 pageHeader.resetSearch();
@@ -85,10 +86,12 @@ ScopeView {
8586 source: getRenderer(model.renderer, model.contentType)
8687
8788 onLoaded: {
89+ if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviourOnNextCreation !== undefined) {
90+ item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
91+ scopeView.enableHeightBehaviorOnNextCreation = false;
92+ }
8893 if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
8994 // TODO: the running apps grid doesn't support standard scope results model yet
90− item.enableHeightBehavior = enableHeightBehavior;
91− enableHeightBehavior = false;
9295 item.firstModel = Qt.binding(function() { return results.firstModel })
9396 item.secondModel = Qt.binding(function() { return results.secondModel })
9497 } else {
@@ -104,8 +107,8 @@ ScopeView {
104107 }
105108
106109 Component.onDestruction: {
107− if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
108− enableHeightBehavior = (item.firstModel.count + item.secondModel.count == 0)
110+ if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviourOnNextCreation !== undefined) {
111+ scopeView.enableHeightBehaviorOnNextCreation = item.enableHeightBehaviourOnNextCreation;
109112 }
110113 }
111114