@@ -26,7 +26,8 @@ Item {
27 property bool forceNonInteractive: false
27 property bool forceNonInteractive: false
28 property alias scopes: dashContentList.model
28 property alias scopes: dashContentList.model
29− readonly property alias currentIndex: dashContentList.currentIndex
29+ property alias currentIndex: dashContentList.currentIndex
30+ property int workaroundRestoreIndex: -1
30 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
31 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
31 readonly property var currentScope: dashContentList.currentItem ? dashContentList.currentItem.theScope : null
32 readonly property var currentScope: dashContentList.currentItem ? dashContentList.currentItem.theScope : null
32 readonly property bool subPageShown: dashContentList.currentItem && dashContentList.currentItem.item ?
33 readonly property bool subPageShown: dashContentList.currentItem && dashContentList.currentItem.item ?
@@ -52,6 +53,15 @@ Item {
52 set_current_index = undefined;
53 set_current_index = undefined;
57+ // FIXME This is to workaround a Qt bug with the model moving the current item
58+ // when the list is ListView.SnapOneItem and ListView.StrictlyEnforceRange
59+ // together with the code in Dash.qml
60+ if (row == dashContentList.currentIndex || start == dashContentList.currentIndex) {
61+ dashContent.workaroundRestoreIndex = dashContentList.currentIndex;
62+ dashContentList.currentIndex = -1;
57 Connections {
67 Connections {