Bug 430671

Summary: Add a Face Tag: default action for Enter key should be the highlighted tag
Product: [Applications] digikam Reporter: Milan Knížek <knizek>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: metzpinguin
Priority: NOR    
Version: 7.1.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 7.2.0
Sentry Crash Report:

Description Milan Knížek 2020-12-21 16:50:04 UTC
SUMMARY

While manually tagging faces on photos (ctrl + mouse drawn face region), digiKam filters the existing Face tags according to text entry in Name field.

Typically, the most recent used tag is highlighted in bold and it is sorted as the first one in the filtered list. The last two items in the filtered list are always "Create XXX in Faces" and "Create XXX".

(The filter works very well.)

However, pressing enter does create a new tag in Faces.
In order to choose the highlighted item, the user must press down arrow and press enter or choose the tag via mouse.


STEPS TO REPRODUCE
1. Draw a rectangle on the image (ctrl + drag).
2. A window for adding a tag name will appear. Start typing an existing face tag. 
3. A drop-down list will show existing tags in "Faces" matching the typed entry.
4. Few of them or just a single one - the top most - will be highlighted. 
5. Press enter key.

OBSERVED RESULT

digiKam creates a new tag in Faces.

EXPECTED RESULT

digiKam assigns the first tag in the drop-down list of existing tags or creates a new tag in Faces, if the list is empty.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux
KDE Frameworks Version: KDE Frameworks 5.77.0
Qt Version: Qt 5.15.2 (built against 5.15.2)
Comment 1 Maik Qualmann 2020-12-21 17:17:35 UTC

*** This bug has been marked as a duplicate of bug 429792 ***
Comment 2 Maik Qualmann 2020-12-21 17:21:18 UTC
This overlay popup is a hack due to a Qt bug. Since the behavior has changed a bit in the newer Qt versions, it currently only works if the widget is displayed the second time. I've already invested a couple of hours but haven't found a good solution yet.

Maik
Comment 3 Maik Qualmann 2021-01-09 18:12:11 UTC
Git commit 86ce760d9b623a6ce2ea8f1b4eb49abd910ca6fb by Maik Qualmann.
Committed on 09/01/2021 at 18:10.
Pushed by mqualmann into branch 'master'.

workaround for the overlay popup that lost updating the text edit
Related: bug 429792, bug 431188, bug 431357
FIXED-IN: 7.2.0

M  +7    -0    core/libs/tags/widgets/addtagscombobox.cpp

https://invent.kde.org/graphics/digikam/commit/86ce760d9b623a6ce2ea8f1b4eb49abd910ca6fb