Improve behavior when changes are detected on the model.

svn path=/trunk/KDE/kdebase/apps/; revision=680643
This commit is contained in:
Rafael Fernández López 2007-06-26 19:52:45 +00:00
parent 4a1e3396d5
commit aa8a499759

View file

@ -948,6 +948,7 @@ void KListView::rowsInsertedArtifficial(const QModelIndex &parent,
int start,
int end)
{
d->lastSelection = QItemSelection();
d->elementsInfo.clear();
d->elementsPosition.clear();
d->elementDictionary.clear();
@ -1052,7 +1053,8 @@ void KListView::rowsRemoved(const QModelIndex &parent,
int start,
int end)
{
if (d->proxyModel)
if ((viewMode() == KListView::IconMode) && d->proxyModel &&
d->itemCategorizer)
{
// Force the view to update all elements
rowsInsertedArtifficial(parent, start, end);