Bug 355851

Summary: Hotspot in ‘Find the details’ activity is wrong
Product: [Applications] gcompris Reporter: Karl Ove Hufthammer <karl>
Component: generalAssignee: Bruno Coudoin <bruno.coudoin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Karl Ove Hufthammer 2015-11-24 16:52:51 UTC
In the ‘Find the details’ activity, the hotspot for the woman in the third level seems to be missing. If one tries to drag the correct piece of the puzzle, it is automatically dragged to the tree hotspot.

Reproducible: Always

Steps to Reproduce:
1. Enter the ‘Find the details’ activity (magnifying glass on the penguin menu).
2. Go to the third level.
3. Try to drag piece for the woman to the correct place.

Actual Results:  
The piece is moved up, to the tree hotspot.

Expected Results:  
The piece should be placed where it belongs.
Comment 1 Karl Ove Hufthammer 2015-11-24 16:56:10 UTC
A similar thing seems to be happening on the 5th level too.
Comment 2 Bruno Coudoin 2015-11-30 21:23:24 UTC
I confirm the bug. In the code we are looking at the first spot close enough instead of finding thte closest stop of all possible one. Need to fix the algorithm.
Comment 3 Bruno Coudoin 2015-12-14 17:48:37 UTC
Git commit 2fe6c469fa9ce1b9120c7523a1774f878f4cae5f by Bruno Coudoin.
Committed on 14/12/2015 at 17:46.
Pushed by bcoudoin into branch 'babymatch_shortest_dist'.

babymatch, use the shortest dist to target instead of drop target

M  +30   -22   src/activities/babymatch/Babymatch.qml
M  +159  -144  src/activities/babymatch/DragListItem.qml
M  +42   -77   src/activities/babymatch/DropAnswerItem.qml
M  +22   -16   src/activities/babymatch/ListWidget.qml
M  +39   -7    src/activities/babymatch/babymatch.js

http://commits.kde.org/gcompris/2fe6c469fa9ce1b9120c7523a1774f878f4cae5f
Comment 4 Bruno Coudoin 2015-12-16 20:34:24 UTC
Git commit 49374323c65c976f18c5fcb679a51e14971c8c59 by Bruno Coudoin.
Committed on 16/12/2015 at 20:27.
Pushed by bcoudoin into branch 'master'.

babymatch, use the shortest dist to target instead of drop target

M  +30   -22   src/activities/babymatch/Babymatch.qml
M  +159  -144  src/activities/babymatch/DragListItem.qml
M  +42   -77   src/activities/babymatch/DropAnswerItem.qml
M  +22   -16   src/activities/babymatch/ListWidget.qml
M  +39   -7    src/activities/babymatch/babymatch.js

http://commits.kde.org/gcompris/49374323c65c976f18c5fcb679a51e14971c8c59
Comment 5 Bruno Coudoin 2015-12-19 09:19:28 UTC
Git commit 76237417e8ed067a3ae0493a186c6cca195b7b8a by Bruno Coudoin.
Committed on 19/12/2015 at 09:12.
Pushed by bcoudoin into branch 'KDE/0.50'.

babymatch, use the shortest dist to target instead of drop target

M  +30   -22   src/activities/babymatch/Babymatch.qml
M  +159  -144  src/activities/babymatch/DragListItem.qml
M  +42   -77   src/activities/babymatch/DropAnswerItem.qml
M  +22   -16   src/activities/babymatch/ListWidget.qml
M  +39   -7    src/activities/babymatch/babymatch.js

http://commits.kde.org/gcompris/76237417e8ed067a3ae0493a186c6cca195b7b8a