After viewing an image and pressing "Up" or "Browse", gwenview should retain the active selection
Review Request #110915 - Created June 9, 2013 and discarded
Fix for bug #319302. Tested.
Going over the browser view, and switching from image view mode to browse mode using "Browse" and the up button.
Hi Schlomi! Thanks a lot for taking the time to provide a way to reproduce the bug and for writing the patch. I tried the patch, and while it fixes the bug, I don't think it fixes the root cause of the problem. After some experimentation, I realized the problem is caused by the fact Gwenview reconfigures the dir model when switching between browse and view modes. If you look at MainWindow::setActiveViewModeAction(), you can see we call setDirModelShowDirs(true) in browse mode and setDirModelShowDirs(false) in view mode. This is done so that folders are shown in the thumbnail view in browse mode, but are hidden from the thumbnail bar in view mode. Unfortunately, this cause the model content to refresh and thus the selection is lost. If I comment out calls to setDirModelShowDirs(), the bug goes away, is it the same for you? The solution I am looking at right now is to always have mDirModel list dirs, have mThumbnailView uses this model, create a proxy model on top of mDirModel which would filter out dirs and use this proxy model for thumbnail bars. This way there is no need to force models to refresh themselves and the bug should be fixed. It is not ready yet, hopefully will be done this week.