]> cloud.milkyroute.net Git - dolphin.git/commit
Do not make items invisible when turning off previews
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 19 Jan 2012 18:52:51 +0000 (19:52 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 19 Jan 2012 18:52:51 +0000 (19:52 +0100)
commit8b73ea3061eec0b0b9f11db6965ee77b487c0633
treee0ba39088316902840b102bfd492d124280d648d
parent7dc1741277b1cb6b9cb1f3c0ee754b32ad347a87
Do not make items invisible when turning off previews

This commit fixes a problem in KItemListView::doLayout(): This function
assumed that firstVisibleIndex is a constant.
However, if the view is scrolled to the bottom with previews enabled,
and then previews are disabled (and the icon size is much smaller
without previews), this function changes the scroll offset, which also
changes the the first visible index. Using the unchanged variable causes
trouble later on (i.e., it makes items which are actually inside the
view area invisible).
lastVisibleIndex is not needed before the scroll offset change and is
const after that, so its calculation is moved a few lines down.
BUG: 291841
FIXED-IN: 4.8.1
REVIEW: 103731
src/kitemviews/kitemlistview.cpp