]> cloud.milkyroute.net Git - dolphin.git/commit
Prevent repeated re-layouting of all items while previews are generated
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 17 Feb 2013 10:21:00 +0000 (11:21 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 17 Feb 2013 10:30:38 +0000 (11:30 +0100)
commitfc0c3f9d4e13d3c7ff3fb56e84458e62abf3ad4b
tree4058b907ae0e9f8be412a5b826bb17f9869e75d5
parentd82d92d7dd71c1ef155b0dd5dea34c257fdad65c
Prevent repeated re-layouting of all items while previews are generated

There was some code in KStandardItemListView::itemSizeHintUpdateRequired
already that was supposed to prevent an expensive re-layouting of all
items when a preview is received. However, it didn't quite work as
intended because also the "iconOverlays" role changed.

The new approach is to only re-layout if text of a visible role changes,
because this is the only way how the space needed by an item might
change (see KStandardItemListWidgetInformant::itemSizeHint()).

BUG: 315315
FIXED-IN: 4.10.1
REVIEW: 108984
src/kitemviews/kstandarditemlistview.cpp