Bug 375755 - Thumbnails filter acts like "find"
Summary: Thumbnails filter acts like "find"
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.25.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-30 14:25 UTC by thekswenson
Modified: 2017-02-02 11:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Search for "sagot" in the thumbnail filter. (3.27 MB, application/pdf)
2017-01-30 14:59 UTC, thekswenson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thekswenson 2017-01-30 14:25:02 UTC
1. open a PDF
2. go to thumbnails view
3. type "the" into the filter bar.

Notice that the thumbnails are not filtered, and only a single occurrence of the word "the" in the document is highlighted in blue.
Each subsequent press of <enter> highlights another occurrence of "the" (it is similar to the fuctionality of <ctrl>f "find").

This is a regression.
The functionality should highlight all occurrences of the word, and filter the thumbnails.
Comment 1 Oliver Sander 2017-01-30 14:52:21 UTC
I can kind of reproduce it with the current git master and a random document.  For me it works sometimes and sometimes it doesn't (in the way described in this bug report).  Unfortunately I don't currently see a pattern.
Comment 2 thekswenson 2017-01-30 14:59:33 UTC
Created attachment 103716 [details]
Search for "sagot" in the thumbnail filter.

Search for "sagot" in the thumbnail filter of this PDF.
Comment 3 thekswenson 2017-01-30 15:02:26 UTC
Bizarrely, when using the file downloaded from this page I do not encounter the problem!?
Comment 4 thekswenson 2017-01-30 15:04:51 UTC
Well, after repeating a couple of times I can reproduce this problem on the uploaded file with the specified string.
Comment 5 Albert Astals Cid 2017-01-31 23:27:27 UTC
It's not a regression, but it's a bug, the problem is because you're pressing enter in the filter bar.

Once you press enter in the filter bar it wrongly "morphs" into a search bar, but that bug seems to have been there "forever", so not really a regression afaics.
Comment 6 Albert Astals Cid 2017-01-31 23:49:59 UTC
Git commit 96d8953878e00543194913a674497c1e656c28de by Albert Astals Cid.
Committed on 31/01/2017 at 23:49.
Pushed by aacid into branch 'Applications/16.12'.

Fix Enter turning the thumbnail filter bar into a regular search bar

M  +2    -2    core/document.h
M  +8    -1    ui/searchlineedit.cpp

https://commits.kde.org/okular/96d8953878e00543194913a674497c1e656c28de
Comment 7 thekswenson 2017-02-01 16:13:48 UTC
The problem occurs even when I do NOT press enter.

Under as-yet unknown circumstances, typing any string into the filter bar will not filter the pages and will not find a single occurrence of the string.
Comment 8 Oliver Sander 2017-02-01 16:25:26 UTC
I confirm that Albert's patch fixed the problem for me.
Comment 9 Albert Astals Cid 2017-02-01 21:57:57 UTC
@thekswenson: If you're able to reproduce it reliably please open a new bug about it.
Comment 10 thekswenson 2017-02-02 11:27:53 UTC
Will do.