]> cloud.milkyroute.net Git - dolphin.git/commit
Properly display parent folders when filtering is active and items are added or refreshed
authorEduardo Cruz <eduardo.cruz@kdemail.net>
Sun, 28 Nov 2021 13:24:32 +0000 (13:24 +0000)
committerFelix Ernst <fe.a.ernst@gmail.com>
Sun, 28 Nov 2021 13:24:32 +0000 (13:24 +0000)
commit3d49996615a094df8fc2cb613955abb740a0463a
tree8762e99acf7bf411388aa616b3bf0850ce8919f5
parent4585f215a9bdec200ced7dad1820f7248281ada3
Properly display parent folders when filtering is active and items are added or refreshed

The methods slotRefreshItems(), slotItemsAdded() and slotItemsDeleted()
are adapted so they are now compatible with the new behavior of
filtering expanded folders achieved in
ed83f37f06bd5c4b38c100503c3ad4dec2a87912. The new behavior is that
expanded folders are hidden from view if neither the folder itself
nor any of its contents passes the filter. Previously expanded folders
would always stay visible no matter the filter.

A bug where the parent expanded folder would disappear after adding
or refreshing an item while filtering is also fixed.

Tests are added to make sure these behavior changes won't regress.

BUG: 442275
FIXED-IN: 22.04
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kfileitemmodel.h
src/tests/kfileitemmodeltest.cpp