FolderStatusModel: Fix beginInsertRow/endInsertRow

We need to do the change between the begin and the end call so the selection
don't get broken
This commit is contained in:
Olivier Goffart 2016-08-31 10:16:25 +02:00
parent 524220d090
commit 9e895a6ecc

View file

@ -1076,11 +1076,14 @@ void FolderStatusModel::slotShowFetchProgress()
auto idx = it.key();
auto* info = infoForIndex(idx);
if (info && info->_fetching) {
if (!info->hasLabel()) {
bool add = !info->hasLabel();
if (add) {
beginInsertRows(idx, 0, 0);
endInsertRows();
}
info->_fetchingLabel = true;
if (add) {
endInsertRows();
}
}
it.remove();
}