Fix crash in organicgridtest
commit86f5ac9b200458429e1851e69c48bde22a29a710
authorAlbert Astals <albert.astals@canonical.com>
dateTue 27 May 2014, 07:46 (12 years ago)
parentf76492483382c5
plugins/Dash/abstractdashview.cpp+3
@@ -176,6 +176,9 @@ void AbstractDashView::refill()
176176
177177bool AbstractDashView::addVisibleItems(qreal fillFromY, qreal fillToY, bool asynchronous)
178178{
179+ if (fillToY <= fillFromY)
180+ return false;
181+
179182 if (!delegate())
180183 return false;
181184
tests/plugins/Dash/organicgridtest.cpp+5
@@ -514,6 +514,11 @@ private Q_SLOTS:
514514
515515 model->setCount(21);
516516
517+ QTRY_COMPARE(grid->m_visibleItems.count(), 0);
518+
519+ grid->setDisplayMarginBeginning(0);
520+ grid->setDisplayMarginEnd(0);
521+
517522 // This is exactly the same block as the first again
518523 checkInitialPositions();
519524 }