@@ -64,12 +64,16 @@ Item {
64 signal done()
64 signal done()
65 signal favoriteSelected(var scopeId)
65 signal favoriteSelected(var scopeId)
66 signal allFavoriteSelected(var scopeId)
66 signal allFavoriteSelected(var scopeId)
67− signal allSelected(var scopeId, var pos)
68− signal searchSelected(var scopeId, var pos, var size)
67+ signal searchSelected(var scopeId, var result, var pos, var size)
71+ onOpenScope: showTemporaryScope(scope);
70− function showTemporaryScope(scope, itemPos, itemSize) {
74+ function showTemporaryScope(scope) {
71− scopesOverviewXYScaler.restorePosition = itemPos;
75+ var itemPos = scopesOverviewXYScaler.restorePosition;
72− scopesOverviewXYScaler.restoreSize = itemSize;
76+ var itemSize = scopesOverviewXYScaler.restoreSize;
73 scopesOverviewXYScaler.scale = itemSize.width / scopesOverviewXYScaler.width;
77 scopesOverviewXYScaler.scale = itemSize.width / scopesOverviewXYScaler.width;
74 scopesOverviewXYScaler.x = itemPos.x -(scopesOverviewXYScaler.width - scopesOverviewXYScaler.width * scopesOverviewXYScaler.scale) / 2;
78 scopesOverviewXYScaler.x = itemPos.x -(scopesOverviewXYScaler.width - scopesOverviewXYScaler.width * scopesOverviewXYScaler.scale) / 2;
75 scopesOverviewXYScaler.y = itemPos.y -(scopesOverviewXYScaler.height - scopesOverviewXYScaler.height * scopesOverviewXYScaler.scale) / 2;
79 scopesOverviewXYScaler.y = itemPos.y -(scopesOverviewXYScaler.height - scopesOverviewXYScaler.height * scopesOverviewXYScaler.scale) / 2;
@@ -276,7 +280,10 @@ Item {
276 if (scopeIndex >= 0) {
280 if (scopeIndex >= 0) {
277 root.allFavoriteSelected(itemModel.scopeId);
281 root.allFavoriteSelected(itemModel.scopeId);
279− root.allSelected(itemModel.scopeId, item.mapToItem(null, 0, 0));
283+ // Will result in an openScope from root.scope
284+ scopesOverviewXYScaler.restorePosition = item.mapToItem(null, 0, 0);
285+ scopesOverviewXYScaler.restoreSize = allCardSize;
286+ root.scope.activate(result);
@@ -309,7 +316,10 @@ Item {
309 clickOverride: function (index, result, item, itemModel) {
316 clickOverride: function (index, result, item, itemModel) {
310 pageHeader.closeSearchHistory();
317 pageHeader.closeSearchHistory();
311 if (itemModel.scopeId) {
318 if (itemModel.scopeId) {
319+ // This can end up in openScope so save restorePosition and restoreSize
320+ scopesOverviewXYScaler.restorePosition = item.mapToItem(null, 0, 0);
321+ scopesOverviewXYScaler.restoreSize = Qt.size(item.width, item.height);
312− root.searchSelected(itemModel.scopeId, item.mapToItem(null, 0, 0), Qt.size(item.width, item.height));
322+ root.searchSelected(itemModel.scopeId, result, item.mapToItem(null, 0, 0), Qt.size(item.width, item.height));
314 // Not a scope, just activate it
324 // Not a scope, just activate it
315 searchResultsViewer.scope.activate(result);
325 searchResultsViewer.scope.activate(result);
@@ -407,6 +417,7 @@ Item {
407 onRunningChanged: {
417 onRunningChanged: {
408 if (!running) {
418 if (!running) {
409 if (root.showingNonFavoriteScope && scopesOverviewXYScaler.scale != 1) {
419 if (root.showingNonFavoriteScope && scopesOverviewXYScaler.scale != 1) {
420+ root.scope.closeScope(tempScopeItem.scope);
410 tempScopeItem.scope = null;
421 tempScopeItem.scope = null;
411 } else if (root.growingDashFromPos) {
422 } else if (root.growingDashFromPos) {
412 root.growingDashFromPos = false;
423 root.growingDashFromPos = false;