on xenial help sign in
set first item either at header height or at 0

For some reason i was getting a item just created with y -40

commit1688311009338b7cff903c4ce3e6fced8cf5b3cc authorAlbert Astals <albert.astals@canonical.com> dateWed 16 Jul 2014, 17:46 (12 years ago) parent418a208
1 file changed+2−2
plugins/Dash/listviewwithpageheader.cpp+2−2
plugins/Dash/listviewwithpageheader.cpp+2−2
@@ -826,8 +826,8 @@ ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIn
826826 ListItem *nextItem = itemAtIndex(modelIndex + 1);
827827 if (nextItem) {
828828 listItem->setY(nextItem->y() - listItem->height());
829− } else if (modelIndex == 0 && m_headerItem) {
830− listItem->setY(m_headerItem->height());
829+ } else if (modelIndex == 0) {
830+ listItem->setY(m_headerItem ? m_headerItem->height() : 0);
831831 } else if (!m_visibleItems.isEmpty()) {
832832 lostItem = true;
833833 }