Bug 440482

Summary: Assigningment of facetags via a tagname, if the tagname is not unique
Product: [Applications] digikam Reporter: Paul Krause <paul_krause_1980>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: andre.kdebug, metzpinguin
Priority: NOR    
Version First Reported In: 7.3.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 7.4.0
Sentry Crash Report:

Description Paul Krause 2021-08-01 10:19:32 UTC
SUMMARY
Assigning a facetag to a face via a string/name in the input box (beneath the face / face thumbnail) assigns the (subjective) wrong tag, if multiple tags with this name (taking just the last part of parentTag/level1/level2/.../tag) exist.


STEPS TO REPRODUCE
1. Make tags "A" and "B"
2. Make substag "Name" in "A" and "B"
3. Sometimes needed, to make 4 possible: If the option "Show only face tags for assigning names in people sidebar" is on, mark "B/Name" as a facetag 
4. Select a face and assign "B/Name" to it
5. Select another face (the input box is already filled with "Name") and hit Enter, Return, or the green OK button.


OBSERVED RESULT
The second face is assigned to "A/Name"


EXPECTED RESULT
The second face is assigned to "B/Name"


ADDITIONAL INFORMATION
I propose the following
A) Somehow "Name" was kept in memory in between assigning the first and second face. Instead of just storing "Name" keep the internal tagid and/or the full tag hierarchy ("B/Name" in my example).
B) If there is ambiguity, the user should be asked and/or tags marked already as face should have priority.

Strictly speaking not the same, but:
Analogous erroneous assignment "A/Name" also happens if "Name" is typed manually into the box of a face.

Thank you!
Comment 1 Maik Qualmann 2021-08-01 11:19:41 UTC
Git commit 0ec4f1c14e598851a194926d7bdd5582c471dff1 by Maik Qualmann.
Committed on 01/08/2021 at 11:18.
Pushed by mqualmann into branch 'master'.

fix signal/slot connections from QCompleter
FIXED-IN: 7.4.0

M  +2    -1    NEWS
M  +1    -1    core/libs/tags/widgets/addtagscombobox.cpp
M  +2    -2    core/libs/tags/widgets/addtagslineedit.cpp
M  +2    -2    core/libs/widgets/text/searchtextbar.cpp

https://invent.kde.org/graphics/digikam/commit/0ec4f1c14e598851a194926d7bdd5582c471dff1
Comment 2 Maik Qualmann 2021-08-01 11:25:11 UTC
Hi Gilles,

I know that you recently added the "this" pointer to the connection because of Krazy. The problem is that the connection with "this" pointer and QCompleter does not work. The connection example is without the "this" pointer from the Qt-Doc.

I don't know the Krazy command to exclude the check at the moment.

Maik
Comment 3 Maik Qualmann 2021-08-01 11:39:59 UTC
Ok, this fixes the selection in QCompleter, but we only pass on the sting to the next image.

Maik
Comment 4 Maik Qualmann 2021-08-01 12:39:13 UTC
Git commit d4fda53005b5d66b55664fc57ad2d36f6a4026b0 by Maik Qualmann.
Committed on 01/08/2021 at 12:38.
Pushed by mqualmann into branch 'master'.

do not clear current TaggingAction
FIXED-IN: 7.4.0

M  +1    -1    core/libs/tags/widgets/addtagslineedit.cpp

https://invent.kde.org/graphics/digikam/commit/d4fda53005b5d66b55664fc57ad2d36f6a4026b0
Comment 5 Maik Qualmann 2021-08-14 09:23:23 UTC
*** Bug 440955 has been marked as a duplicate of this bug. ***