From 0c92d4d09b48f5b990323874efd1cf9986a6f049 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 15 Oct 2017 15:13:27 +0200 Subject: [PATCH] don't switch activity on startup --- shell/contents/views/Desktop.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/shell/contents/views/Desktop.qml b/shell/contents/views/Desktop.qml index d78e832a..096f5197 100644 --- a/shell/contents/views/Desktop.qml +++ b/shell/contents/views/Desktop.qml @@ -50,12 +50,13 @@ Item { height: 10 cacheItemCount: 999//count delegate: Item { - Component.onCompleted: { - activityModel.setCurrentActivity(model.id, function(){}); - } Connections { - target: model - onCurrentChanged: activityModel.setCurrentActivity(model.id, function(){}); + target: activitiesRepresentation + onCurrentIndexChanged: { + if (index == activitiesRepresentation.currentIndex) { + activityModel.setCurrentActivity(model.id, function(){}); + } + } } } }