Commit 89db71ea authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Don't announce insertions bigger than we can take

Showed glitches sometimes with the Reviews
parent 1f5dfc63
......@@ -318,8 +318,8 @@ void PaginateModel::_k_sourceRowsAboutToBeInserted(const QModelIndex& parent, in
}
if(canSizeChange()) {
const int insertedCount = end-start;
const int newStart = qMax(start-m_firstItem, 0);
const int insertedCount = qMin(end-start, pageSize() - newStart -1);
beginInsertRows(QModelIndex(), newStart, newStart+insertedCount);
} else {
beginResetModel();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment