on xenial help sign in
Make sure items are layouted before using their y

Fixes issues whith the "There can only be one" toggling

commit8c9c1ed3927a71f6fe147a9f5480fe8ec601895f authorAlbert Astals <albert.astals@canonical.com> dateTue 6 Aug 2013, 16:46 (13 years ago) parentfb8f514
1 file changed+1
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+1
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+1
@@ -394,6 +394,7 @@ void ListViewWithPageHeader::maximizeVisibleArea(int modelIndex)
394394 ListItem *listItem = itemAtIndex(modelIndex);
395395 if (listItem)
396396 {
397+ layout();
397398 const auto listItemY = m_clipItem->y() + listItem->y();
398399 if (listItemY > contentY() && listItemY + listItem->height() > contentY() + height()) {
399400 // we can scroll the list up to show more stuff