on xenial help sign in
Merge new-scopes.
f5c9430Michał Sawicz
qml/Dash/GenericScopeView.qml+7−7
@@ -184,16 +184,16 @@ FocusScope {
184 Connections {
184 Connections {
185 target: rendererLoader.item
185 target: rendererLoader.item
186 onClicked: {
186 onClicked: {
187− // Prepare the preview in case activate() triggers a preview only
188− previewListView.model = target.model;
189− previewListView.currentIndex = -1
190− previewListView.currentIndex = index;
191−
192− var item = target.model.get(index);
193−
194 if (scopeView.scope.id === "scopes" || (scopeView.scope.id == "clickscope" && categoryId == "local")) {
187 if (scopeView.scope.id === "scopes" || (scopeView.scope.id == "clickscope" && categoryId == "local")) {
188+ // TODO Technically it is possible that calling activate() will make the scope emit
189+ // previewRequested so that we show a preview but there's no scope that does that yet
190+ // so it's not implemented
191+ var item = target.model.get(index);
195 scopeView.scope.activate(item.result)
192 scopeView.scope.activate(item.result)
196 } else {
193 } else {
194+ previewListView.model = target.model;
195+ previewListView.currentIndex = -1
196+ previewListView.currentIndex = index;
197 previewListView.open = true
197 previewListView.open = true
198 }
198 }
199 }
199 }