]> cloud.milkyroute.net Git - dolphin.git/commit
Keep current item and selection when resorting, part 1
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 29 Sep 2011 18:50:00 +0000 (20:50 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 29 Sep 2011 18:50:00 +0000 (20:50 +0200)
commit7424fcc3314a63d0716cb428a8b8de24b23e0279
tree3c51a6b755fa6eb27806e947dde63d93739b48d8
parente43f29576d4666a66cd4d236418baf403f176069
Keep current item and selection when resorting, part 1

KFileItemModel now emits the itemsMoved signal when the model
is resorted, and KItemListSelectionManager has a new function
itemsMoved() which will be called indirectly when this signal
is emitted. Unit tests for the new functionality are included.
The following things are still needed to make the feature
work:
1. KFileItemMdel::resortAllItems() should not emit
   itemsAdded/itemsRemoved any more.
2. KItemListView::itemsMoved() must update the view according
   to the changes in the model, and it must call
   KItemListSelectionManager::itemsMoved().
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kitemlistselectionmanager.cpp
src/kitemviews/kitemlistselectionmanager.h
src/kitemviews/kitemlistview.cpp
src/kitemviews/kitemlistview.h
src/kitemviews/kitemmodelbase.h
src/tests/kfileitemmodeltest.cpp
src/tests/kitemlistselectionmanagertest.cpp