Bug 448910 - GUI remains disabled after search for similarities returns an empty result
Summary: GUI remains disabled after search for similarities returns an empty result
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Similarity (show other bugs)
Version: 7.5.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-21 16:36 UTC by Frank Steinmetzger
Modified: 2022-01-21 19:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Steinmetzger 2022-01-21 16:36:23 UTC
I tried to look for duplicates in a subtree of my collection.

STEPS TO REPRODUCE
1. Select an album in the UI, which has subalbums, but no images. Having no previous experience with the UI, I assumed it would search all subalbums, which is not the case.
2. Run search.
3. Now the result list is emptied, the search UI is completely disabled, the search starts and finishes immediately. 

OBSERVED RESULT
The search UI is not enabled again.
When I switch to another tab on the left sidebar, and back to the search tab, the result of the *previous* search is shown and *only* the start search button is re-enabled.

While research reproducibility, I found another glitch: right after the search finishes and if it returns a non-empty result, the [Remove duplicates] button is enabled right away. When I now switch to another tab and back to the search tab, the button (and only this one) is disabled.

EXPECTED RESULT
The UI should be fully enabled again. The Enabled state of UI elements should always be comprehensible to the user, depending on the current state of other UI parts.

Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.1-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-4590 CPU @ 3.30GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 1 caulier.gilles 2022-01-21 17:12:22 UTC
Which kind of database type do you use ?

Gilles Caulier
Comment 2 Frank Steinmetzger 2022-01-21 17:56:08 UTC
I use sqlite.
Comment 3 Maik Qualmann 2022-01-21 18:01:44 UTC
Git commit dc4e8b6e56dd9a19d6c31e67019f643b876a3375 by Maik Qualmann.
Committed on 21/01/2022 at 18:00.
Pushed by mqualmann into branch 'master'.

fix no return from empty search

M  +4    -0    core/libs/database/dbjobs/dbjob.cpp

https://invent.kde.org/graphics/digikam/commit/dc4e8b6e56dd9a19d6c31e67019f643b876a3375
Comment 4 Maik Qualmann 2022-01-21 19:45:11 UTC
The thing about the remove duplicates button is by design. Since the last search is always active when switching to the duplicates search tab, it should not be possible to "accidentally" press the remove button. You should "consciously" do a search and then remove it. The original programmer did it as a pure delete operation. i changed it as a trash action, so it wouldn't be so bad if the button is pressed. I would leave it as it is for now.

Maik