KItemListSelectionManager::itemsMoved (called when sorting by size)
was re-activating anchor selection regardless if we actually were
doing an anchored selection. This was leading to an incorrect
selection when navigating back.
BUG: 352296
elvisangelaccio |
Dolphin |
KItemListSelectionManager::itemsMoved (called when sorting by size)
was re-activating anchor selection regardless if we actually were
doing an anchored selection. This was leading to an incorrect
selection when navigating back.
BUG: 352296
In any folder, sort by size then move to a subfolder. Navigate back
to the parent folder: only the parent folder should be selected.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Thanks, patch looks good and kitemlistselectionmanagertest still passes.
I don't understand though why the bug only happens with size sorting...
That happens only with size sorting because we modify the "size" of folders by setting the number of items in them. That triggers a re-sort once this is done, that in turns call itemsMoved and triggers the bug.
See the special case in KFileItemModelRolesUpdater::applySortRole for details.
It took me a while to figure this out, but it looks like there is no other root cause to this bug.