on xenial help sign in
Merge new-scopes.
commitf5c9430e7855c2f6420cbf34bf25d2477b6ef038 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 6 Mar 2014, 12:06 (13 years ago) parent78f8baaf13e25d
1 file changed+7−7
qml/Dash/GenericScopeView.qml+7−7
qml/Dash/GenericScopeView.qml+7−7
@@ -184,16 +184,16 @@ FocusScope {
184184 Connections {
185185 target: rendererLoader.item
186186 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−
194187 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);
195192 scopeView.scope.activate(item.result)
196193 } else {
194+ previewListView.model = target.model;
195+ previewListView.currentIndex = -1
196+ previewListView.currentIndex = index;
197197 previewListView.open = true
198198 }
199199 }