Bug 291841 - Invisible items when toggling "previews"
Summary: Invisible items when toggling "previews"
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: view-engine: general (show other bugs)
Version: 2.0
Platform: Unlisted Binaries Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2012-01-18 09:49 UTC by Peter Penz
Modified: 2012-01-19 19:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Penz 2012-01-18 09:49:50 UTC
Version:           2.0 (using Devel) 
OS:                Linux

When toggling the previews it is possible that items of the view are invisible until using the scrollbar or changing the size of the window.

Reproducible: Always

Steps to Reproduce:
- Use e.g. the icons-mode in a folder with a huge number of items
- Assure the "previews" is turned on; the icon-sizes of previews should be noticeable larger than the size without previews
- Scroll to the bottom
- Toggle "previews" so that they are turned off

Actual Results:  
Only the bottom row of items is shown

Expected Results:  
All item rows should be shown

This seems to be a general issue and not related to the icon-view, however it is easy to reproduce with the icon-view.
Comment 1 Frank Reininghaus 2012-01-19 18:56:56 UTC
Git commit cc8f5b4939062df44ce0bd314ac4ae04973b9830 by Frank Reininghaus.
Committed on 19/01/2012 at 19:52.
Pushed by freininghaus into branch 'KDE/4.8'.

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.
FIXED-IN: 4.8.1
REVIEW: 103731

M  +4    -2    dolphin/src/kitemviews/kitemlistview.cpp

http://commits.kde.org/kde-baseapps/cc8f5b4939062df44ce0bd314ac4ae04973b9830
Comment 2 Frank Reininghaus 2012-01-19 19:00:08 UTC
Git commit f491f641591c49df019de95994c4883c1cc8fade by Frank Reininghaus.
Committed on 19/01/2012 at 19:52.
Pushed by freininghaus into branch 'master'.

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

M  +4    -2    dolphin/src/kitemviews/kitemlistview.cpp

http://commits.kde.org/kde-baseapps/f491f641591c49df019de95994c4883c1cc8fade