on xenial help sign in
Fix crash and test
83382c5Albert Astals
plugins/Dash/abstractdashview.cpp+3
@@ -176,6 +176,9 @@ void AbstractDashView::refill()
176
176
177bool AbstractDashView::addVisibleItems(qreal fillFromY, qreal fillToY, bool asynchronous)
177bool AbstractDashView::addVisibleItems(qreal fillFromY, qreal fillToY, bool asynchronous)
178{
178{
179+ if (fillToY <= fillFromY)
180+ return false;
181+
179 if (!delegate())
182 if (!delegate())
180 return false;
183 return false;
181
184
tests/plugins/Dash/organicgridtest.cpp+5
@@ -514,6 +514,11 @@ private Q_SLOTS:
514
514
515 model->setCount(21);
515 model->setCount(21);
516
516
517+ QTRY_COMPARE(grid->m_visibleItems.count(), 0);
518+
519+ grid->setDisplayMarginBeginning(0);
520+ grid->setDisplayMarginEnd(0);
521+
517 // This is exactly the same block as the first again
522 // This is exactly the same block as the first again
518 checkInitialPositions();
523 checkInitialPositions();
519 }
524 }