on xenial help sign in
improve comment
a335a47Albert Astals
plugins/DashViews/verticaljournal.cpp+3−1
@@ -516,7 +516,9 @@ void VerticalJournal::onModelUpdated(const QQmlChangeSet &changeSet, bool reset)
516 for (int i = remove.count - 1; i >= 0; --i) {
516 for (int i = remove.count - 1; i >= 0; --i) {
517 const int indexToRemove = remove.index + i;
517 const int indexToRemove = remove.index + i;
518 // Since we only support removing from the end, indexToRemove
518 // Since we only support removing from the end, indexToRemove
519− // must refer to the last item of one of the columns.
519+ // must refer to the last item of one of the columns or
520+ // be bigger than them (because it's not in the viewport and
521+ // thus we have not created a delegate for it)
520 bool found = false;
522 bool found = false;
521 int lastCreatedIndex = INT_MIN;
523 int lastCreatedIndex = INT_MIN;
522 for (int i = 0; !found && i < m_columnVisibleItems.count(); ++i) {
524 for (int i = 0; !found && i < m_columnVisibleItems.count(); ++i) {