on xenial help sign in
forceLayout before calling positionViewAtIndex

We need the list size to be correctly updated before positionViewAtIndex This needs https://codereview.qt-project.org/#/c/151559/ to actually work

commitc9fdb2572515aace0ed3e430f9c95e513a331bfb authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 7 Mar 2016, 13:30 (11 years ago) parent51e24ac
1 file changed+4−1
qml/Dash/Previews/Preview.qml+4−1
qml/Dash/Previews/Preview.qml+4−1
@@ -105,7 +105,10 @@ Item {
105105
106106 onFocusChanged: if (focus) column.positionViewAtIndex(index, ListView.Contain)
107107
108− onHeightChanged: if (focus) column.positionViewAtIndex(index, ListView.Contain)
108+ onHeightChanged: if (focus) {
109+ column.forceLayout();
110+ column.positionViewAtIndex(index, ListView.Contain)
111+ }
109112 }
110113 }
111114 }