Bug 289454 - Two faces tagged instead of one
Summary: Two faces tagged instead of one
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Engine (show other bugs)
Version: 2.4.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-20 19:55 UTC by Frederic Grelot
Modified: 2012-07-04 20:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Grelot 2011-12-20 19:55:42 UTC
Version:           2.4.0 (using KDE 4.7.3) 
OS:                Linux

I already reported a similar bug earlier, but it's been solved since. This one is new.

Reproducible: Always

Steps to Reproduce:
-Take 3 pictures with faces that the tool recognized : A, B, C
-Select (in thumb mode view) A
-choose a name for that picture, leave (if possible) the mouse cursor over the name field, then hit return to validate it
-A disappears from the view (doesn't belong to the "unknown face" race)
-B gets selected, the focus is already in the name field
-just hit Return

Actual Results:  
Both B and C get tagged

Expected Results:  
B should get tagged, not C, and C should be selected

OS: Linux (x86_64) release 3.1.5-2.fc16.x86_64
Compiler: gcc

I noticed that both B and C get tagged immediately : the problem is NOT B on key pressed, then C on key released.
By checking that, I also noticed that if you keep return pressed, lots of pictures get tagged (as long as you don't release return) : this is maybe not an expected result.
Comment 2 Marcel Wiesweg 2012-05-19 11:45:09 UTC
The same event is handled twice because line edit does not accept the event when emitting returnPressed:

#0  Digikam::DigikamImageView::confirmFaces (this=0xe3ffe0, indexes=..., tagId=1006)
    at /home/marcel/freshmeat/multimedia/kde4/src/extragear/graphics/digikam/core/digikam/items/digikamimageview.cpp:250
#1  0x00000000005f8e16 in Digikam::DigikamImageView::qt_metacall (this=0xe3ffe0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=
    0x7fffffffb140) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/digikamimageview.moc:186
#2  0x00007ffff1032a5f in QMetaObject::activate (sender=0xe353c0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=
    0x7fffffffb140) at kernel/qobject.cpp:3278
#3  0x0000000000608e71 in Digikam::AssignNameOverlay::confirmFaces (this=<value optimized out>, _t1=<value optimized out>, _t2=1006)
    at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnameoverlay.moc:97
#4  0x0000000000609819 in Digikam::AssignNameOverlay::slotAssigned (this=0xe353c0, action=<value optimized out>, info=<value optimized out>, 
    faceIdentifier=<value optimized out>)
    at /home/marcel/freshmeat/multimedia/kde4/src/extragear/graphics/digikam/core/digikam/items/assignnameoverlay.cpp:306
#5  0x00000000006099c8 in Digikam::AssignNameOverlay::qt_metacall (this=0xe353c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7fffffffb320) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnameoverlay.moc:84
#6  0x00007ffff1032a5f in QMetaObject::activate (sender=0x41cff00, m=<value optimized out>, local_signal_index=<value optimized out>, argv=
    0x7fffffffb320) at kernel/qobject.cpp:3278
#7  0x000000000069995a in Digikam::AssignNameWidget::assigned (this=<value optimized out>, _t1=<value optimized out>, _t2=<value optimized out>, 
    _t3=<value optimized out>) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnamewidget.moc:200
#8  0x000000000069b22d in Digikam::AssignNameWidget::qt_metacall (this=0x41cff00, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7fffffffb450)
    at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnamewidget.moc:153
#9  0x00007ffff1032a5f in QMetaObject::activate (sender=0xe6eaf0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=
    0x7fffffffb450) at kernel/qobject.cpp:3278
#10 0x000000000061b750 in Digikam::AddTagsLineEdit::taggingActionActivated (this=<value optimized out>, _t1=<value optimized out>)
    at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/addtagslineedit.moc:120
#11 0x000000000061c0da in Digikam::AddTagsLineEdit::slotReturnPressed (this=0xe6eaf0, text=<value optimized out>)
    at /home/marcel/freshmeat/multimedia/kde4/src/extragear/graphics/digikam/core/digikam/tags/addtagslineedit.cpp:368
#12 0x000000000061c491 in Digikam::AddTagsLineEdit::qt_metacall (this=0xe6eaf0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=
    0x7fffffffb590) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/addtagslineedit.moc:107
#13 0x00007ffff1032a5f in QMetaObject::activate (sender=0xe6eaf0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=
    0x7fffffffb590) at kernel/qobject.cpp:3278
#14 0x00007ffff1b1af55 in KLineEdit::returnPressed(QString const&) () from /usr/lib64/libkdeui.so.5
#15 0x00007ffff1b1d64e in KLineEdit::keyPressEvent(QKeyEvent*) () from /usr/lib64/libkdeui.so.5
#16 0x00007fffeffa2ce0 in QWidget::event (this=0xe6eaf0, event=0x7fffffffc260) at kernel/qwidget.cpp:8294


#0  Digikam::DigikamImageView::confirmFaces (this=0xe3ffe0, indexes=..., tagId=1006)
    at /home/marcel/freshmeat/multimedia/kde4/src/extragear/graphics/digikam/core/digikam/items/digikamimageview.cpp:250
#1  0x00000000005f8e16 in Digikam::DigikamImageView::qt_metacall (this=0xe3ffe0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=
    0x7fffffffb810) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/digikamimageview.moc:186
#2  0x00007ffff1032a5f in QMetaObject::activate (sender=0xe353c0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=
    0x7fffffffb810) at kernel/qobject.cpp:3278
#3  0x0000000000608e71 in Digikam::AssignNameOverlay::confirmFaces (this=<value optimized out>, _t1=<value optimized out>, _t2=1006)
    at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnameoverlay.moc:97
#4  0x0000000000609819 in Digikam::AssignNameOverlay::slotAssigned (this=0xe353c0, action=<value optimized out>, info=<value optimized out>, 
    faceIdentifier=<value optimized out>)
    at /home/marcel/freshmeat/multimedia/kde4/src/extragear/graphics/digikam/core/digikam/items/assignnameoverlay.cpp:306
#5  0x00000000006099c8 in Digikam::AssignNameOverlay::qt_metacall (this=0xe353c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7fffffffb9f0) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnameoverlay.moc:84
#6  0x00007ffff1032a5f in QMetaObject::activate (sender=0x41cff00, m=<value optimized out>, local_signal_index=<value optimized out>, argv=
    0x7fffffffb9f0) at kernel/qobject.cpp:3278
#7  0x000000000069995a in Digikam::AssignNameWidget::assigned (this=<value optimized out>, _t1=<value optimized out>, _t2=<value optimized out>, 
    _t3=<value optimized out>) at /home/marcel/freshmeat/multimedia/kde4/build/extragear/graphics/digikam/core/digikam/assignnamewidget.moc:200
#8  0x000000000069a748 in Digikam::AssignNameWidget::slotConfirm (this=0x41cff00)
    at /home/marcel/freshmeat/multimedia/kde4/src/extragear/graphics/digikam/core/utilities/facedetection/assignnamewidget.cpp:715
#9  0x00007fffeffa2ce0 in QWidget::event (this=0x41cff00, event=0x7fffffffc260) at kernel/qwidget.cpp:8294
#10 0x00007ffff0347a86 in QFrame::event (this=0x41cff00, e=0x7fffffffc260) at widgets/qframe.cpp:557
Comment 3 Marcel Wiesweg 2012-05-19 11:53:31 UTC
Git commit c9893c9218809c7b7f16a70314af3d9036d35caa by Marcel Wiesweg.
Committed on 19/05/2012 at 13:51.
Pushed by mwiesweg into branch 'master'.

With AddTagsLineEdit, the return key triggers an action and should be accepted,
to prevent triggering the same event if the parent widget also listens for Return.

M  +2    -1    NEWS
M  +1    -0    digikam/tags/addtagslineedit.cpp

http://commits.kde.org/digikam/c9893c9218809c7b7f16a70314af3d9036d35caa
Comment 4 Marcel Wiesweg 2012-07-04 20:00:22 UTC
*** Bug 281792 has been marked as a duplicate of this bug. ***