on xenial help sign in
Set currentIndex after the model change is completed
cb700adAlberto Mardegan
qml/Dash/PreviewListView.qml+2−2
@@ -86,10 +86,10 @@ Item {
86 }
86 }
87 }
87 }
88
88
89− onCountChanged: {
89+ onModelChanged: {
90 if (count > 0 && initialIndex >= 0 && !usedInitialIndex) {
90 if (count > 0 && initialIndex >= 0 && !usedInitialIndex) {
91 usedInitialIndex = true;
91 usedInitialIndex = true;
92− currentIndex = initialIndex;
92+ previewListView.positionViewAtIndex(initialIndex, ListView.SnapPosition);
93 }
93 }
94 }
94 }
95
95