Do not make items invisible when turning off previews

Authored by Frank Reininghaus <frank78ac@googlemail.com> on Jan 19 2012, 6:52 PM.

Description

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.
CCBUG: 291841
FIXED-IN: 4.8.1
(cherry picked from commit cc8f5b4939062df44ce0bd314ac4ae04973b9830)

Details

Committed
Frank Reininghaus <frank78ac@googlemail.com>Jan 19 2012, 6:57 PM
Parents
R318:d13504b5a741: When populating the "Show Remote Encoding" menu, put the check mark besides theā€¦
Branches
Unknown
Tags
Unknown
Frank Reininghaus <frank78ac@googlemail.com> committed R318:a043163b617d: Do not make items invisible when turning off previews (authored by Frank Reininghaus <frank78ac@googlemail.com>).Jan 19 2012, 6:57 PM