Bug 411878 - Dolphin is not clearing prior filter view if directory is open
Summary: Dolphin is not clearing prior filter view if directory is open
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: bars: filter (show other bugs)
Version: 21.08.1
Platform: Archlinux Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Eduardo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-13 03:01 UTC by Kevin Dackiw
Modified: 2021-10-04 07:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 21.12


Attachments
Picture of issue (84.02 KB, application/vnd.oasis.opendocument.graphics)
2019-09-13 03:01 UTC, Kevin Dackiw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Dackiw 2019-09-13 03:01:31 UTC
Created attachment 122636 [details]
Picture of issue

SUMMARY
Filter bar does not clear last result IF you have a folder expanded

STEPS TO REPRODUCE
1. bring up a directory list then use filter to constrain to an entry
2. expand the directory entry
3. clear the filter term then do another search to constrain to an entry
4. the original 'opened' folder remains in the view

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Eduardo 2021-09-09 08:58:56 UTC
Happens to me on current version. I'm updating the version and changing to CONFIRMED.

You can actually reproduce it by simply expanding some folder before filtering, then filter by some nonsense string "asdasdasd" than should yield zero results, but the folder you expanded will show as a result.
Comment 2 Eduardo 2021-09-10 04:22:21 UTC
I found the bug: void KFileItemModel::applyFilters() in the file src/kitemviews/kfileitemmodel.cpp. The algorithm creates the bug on purpose, but it doesn't have to.

I'll try to fix it over the weekend. Assigning to myself.
Comment 3 Bug Janitor Service 2021-09-10 19:03:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/271
Comment 4 Méven Car 2021-10-04 07:14:06 UTC
Git commit ed83f37f06bd5c4b38c100503c3ad4dec2a87912 by Méven Car, on behalf of Eduardo Cruz.
Committed on 04/10/2021 at 07:13.
Pushed by meven into branch 'master'.

Rewrite filter algorithm to properly support filtering with expanded folders under Detail View mode.
Related: bug 442275
FIXED-IN: 21.12

M  +63   -21   src/kitemviews/kfileitemmodel.cpp
M  +26   -12   src/tests/kfileitemmodeltest.cpp

https://invent.kde.org/system/dolphin/commit/ed83f37f06bd5c4b38c100503c3ad4dec2a87912