<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>430671</bug_id>
          
          <creation_ts>2020-12-21 16:50:04 +0000</creation_ts>
          <short_desc>Add a Face Tag: default action for Enter key should be the highlighted tag</short_desc>
          <delta_ts>2021-01-09 18:12:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Faces-Workflow</component>
          <version>7.1.0</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Milan Knížek">knizek</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>metzpinguin</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/digikam/commit/86ce760d9b623a6ce2ea8f1b4eb49abd910ca6fb</cf_commitlink>
          <cf_versionfixedin>7.2.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1987316</commentid>
    <comment_count>0</comment_count>
    <who name="Milan Knížek">knizek</who>
    <bug_when>2020-12-21 16:50:04 +0000</bug_when>
    <thetext>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 &quot;Create XXX in Faces&quot; and &quot;Create XXX&quot;.

(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 &quot;Faces&quot; 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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987325</commentid>
    <comment_count>1</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2020-12-21 17:17:35 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 429792 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987327</commentid>
    <comment_count>2</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2020-12-21 17:21:18 +0000</bug_when>
    <thetext>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&apos;ve already invested a couple of hours but haven&apos;t found a good solution yet.

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1992659</commentid>
    <comment_count>3</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2021-01-09 18:12:11 +0000</bug_when>
    <thetext>Git commit 86ce760d9b623a6ce2ea8f1b4eb49abd910ca6fb by Maik Qualmann.
Committed on 09/01/2021 at 18:10.
Pushed by mqualmann into branch &apos;master&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>