Bug 430671 - Add a Face Tag: default action for Enter key should be the highlighted tag
Summary: Add a Face Tag: default action for Enter key should be the highlighted tag
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 7.1.0
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-21 16:50 UTC by Milan Knížek
Modified: 2021-01-09 18:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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