Panel: Fixed unwanted scrolling and preserving current item on refresh
ClosedPublic

Authored by abika on Mar 31 2018, 5:08 PM.

Details

Summary
Test Plan
  • tested current selection on panel startup
  • tested current selection when going back in history
  • tested preserving current and scrolling on manual refresh
  • tested preserving current and scrolling when files are deleted
  • tested preserving current and scrolling when files are added
  • tested preserving current and scrolling when file is updated
  • tested selecting current and scrolling when creating new dir
  • tested selecting current when renaming file

Diff Detail

Repository
R167 Krusader
Branch
my-fix-panel-current-on-refresh
Lint
No Linters Available
Unit
No Unit Test Coverage
abika requested review of this revision.Mar 31 2018, 5:08 PM
abika created this revision.
abika added a comment.Mar 31 2018, 5:49 PM

Oh, fu... this seems to be a replacement for D11699. Didn't see this first, i just get too many mails recently.

martinkostolny requested changes to this revision.Apr 1 2018, 9:21 PM
martinkostolny added a subscriber: martinkostolny.

Hi Alex! Thanks for looking into this. You seem to have a complex patch that fixes more issues regarding the refreshing. I'll abandon D11699 in favour of this one.

However I've found a few drawbacks:

  1. going up in hierarchy or going back in history does not preserve current selection anymore
  2. current selection under currently refreshing file losts (even up/down arrows won't bring it back)
This revision now requires changes to proceed.Apr 1 2018, 9:21 PM
abika updated this revision to Diff 31164.Apr 2 2018, 5:49 PM
  • Panel: Fix current item not selected when going back in history
  • Panel: Fix lost current if the previous item is removed
abika added a comment.Apr 2 2018, 5:52 PM

Thanks for testing!
I thought I tested the first behaviour. But probably did changes after that :/
And the second one is strange, don't know exactly why the current is lost only in this particular case.

martinkostolny accepted this revision.Apr 2 2018, 8:49 PM

Now everything seems to work just fine, thanks!

This revision is now accepted and ready to land.Apr 2 2018, 8:49 PM
nmel accepted this revision.Apr 3 2018, 7:24 AM
nmel added a subscriber: nmel.

Thanks for the fixes, Alex! It passed all my tests. Please consider my inline comments.

krusader/Panel/PanelView/krview.cpp
549

coding style: space

552

coding style: space

577

coding style: space

krusader/Panel/PanelView/listmodel.cpp
356

coding style: space

krusader/Panel/panelfunc.cpp
310

Unused var.

Closed by commit R167:2fbd49f01a89: Panel: Fixed unwanted scrolling and preserving current item on refresh (authored by Alexander Bikadorov <alex.bikadorov@kdemail.net>). · Explain WhyApr 9 2018, 6:11 PM
This revision was automatically updated to reflect the committed changes.
abika marked 5 inline comments as done.Apr 9 2018, 6:13 PM

Thanks for testing and review!