@@ -21,6 +21,8 @@ import "../Components"
21import "Previews" as Previews
21import "Previews" as Previews
24 property OpenEffect openEffect: null
26 property OpenEffect openEffect: null
25 property ScopeListView categoryView: null
27 property ScopeListView categoryView: null
26 property Scope scope: null
28 property Scope scope: null
@@ -98,12 +100,6 @@ Item {
99 categoryDelegate.highlightIndex = currentIndex
101 categoryDelegate.highlightIndex = currentIndex
101− if (model !== undefined) {
102− var item = model.get(currentIndex)
103− var previewStack = scope.preview(item.result)
104− previewListView.currentItem.previewModel = previewStack.get(0)
107 // Adjust contentY in case we need to change to it to show the next row
103 // Adjust contentY in case we need to change to it to show the next row
108 if (categoryDelegate.rows > 1) {
104 if (categoryDelegate.rows > 1) {
109 var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
105 var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
@@ -167,6 +163,22 @@ Item {
168 onPreviewModelChanged: preview.opacity = 0;
164 onPreviewModelChanged: preview.opacity = 0;
169 onReadyChanged: if (ready) fadeIn.start()
165 onReadyChanged: if (ready) fadeIn.start()
168+ // We need the isCurrent because the scope fails to
169+ // deliver the preview if we ask for one after other very quickly
170+ // If we remove the isCurrent, we will have to think another way of
171+ // doing the fadeIn or just don't do it at all or just decide
172+ // this code is good enough and remove the TODO
174+ var previewStack = root.scope.preview(result);
175+ return previewStack.get(0);
170// onClose: {
182// onClose: {
171// previewListView.open = false
183// previewListView.open = false