Review Request 128563: Preserve selected items when changing folders

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Sun Jan 29 14:49:30 GMT 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128563/#review102312
-----------------------------------------------------------



I hope that this is more understandable than my previous attempt.


src/dolphinviewcontainer.cpp (lines 455 - 460)
<https://git.reviewboard.kde.org/r/128563/#comment68292>

    Move this code to `DolphinViewContainer::slotUrlNavigatorLocationChanged` after `m_view->setUrl(url)` 
    or swap `QTimer::singleShot(0, this, &DolphinView::updateViewState)` and `emit directoryLoadingCompleted()` in `DolphinView::slotDirectoryLoadingCompleted`.
    I don't know what of boths approaches is the nicer one (maybe 1. because it doesn't rely on the event queue ordering), but it's up to you ;)
    
    This makes sure that the member variables (m_selectedUrls, ...) are restored before DolphinView::updateViewState() gets invoked and we can avoid the work-around in `DolphinView::restoreState`.



src/views/dolphinview.cpp (lines 1196 - 1203)
<https://git.reviewboard.kde.org/r/128563/#comment68293>

    `DolphinView::updateViewState` does this already. Can be removed.


- Emmanuel Pescosta


On Dec. 11, 2016, 1:38 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128563/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2016, 1:38 p.m.)
> 
> 
> Review request for Dolphin, David Faure, Elvis Angelaccio, Emmanuel Pescosta, and Sune Vuorela.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> Instead of just clearing the selection when going back and forth in history, it now preserves the selected items.
> 
> Another bug it fixes is if you enter a folder, go back, and then hold down shift and press an arrow key to try to select something.
> 
> 
> Diffs
> -----
> 
>   src/dolphinviewcontainer.h 62f9110 
>   src/dolphinviewcontainer.cpp 1c43fc9 
>   src/views/dolphinview.cpp a737dd0 
> 
> Diff: https://git.reviewboard.kde.org/r/128563/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Tobias Holmedahl Sandsmark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20170129/33a52a18/attachment.htm>


More information about the kfm-devel mailing list