Bug 297970 - Wrong image deleted [patch]
Summary: Wrong image deleted [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Trash (show other bugs)
Version: 2.6.0
Platform: Mageia RPMs Linux
: NOR critical
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 13:33 UTC by Axone
Modified: 2017-08-08 15:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0
Sentry Crash Report:


Attachments
Patch for Wrong Image Deleted. (1.12 KB, patch)
2012-04-19 16:05 UTC, Varun Herale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axone 2012-04-12 13:33:21 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3
Build Identifier: 

In image editor, when I click on "Mettre à la corbeille" (move to trash ?), it's not the current image ("image A") that is delete but the next in the album ("image B").  Then the image editor show me the next-next image ("image C").
With the action "supprimer un fichier définitivement" (erase permanently ?), it's the same bug. So, no image to restore in the trash.

Reproducible: Always

Steps to Reproduce:
1. click on "Mettre à la corbeille"
2.
3.
Actual Results:  
The wrong image is deleted

Expected Results:  
the current must be deleted

Tested on :
digiKam
Version 2.6.0-beta3
Utilisation de la plate-forme de développement de KDE 4.8.2 (4.8.2)

From Mageia 2 beta 2
Comment 1 caulier.gilles 2012-04-12 14:04:04 UTC
i can reproduce here...

Gilles Caulier
Comment 2 Varun Herale 2012-04-19 16:05:59 UTC
Created attachment 70506 [details]
Patch for Wrong Image Deleted.

Hello,

The problem is that the image is being deleted after the next image is loaded. Hence the next image is being deleted. 

Attaching the proposed patch for this bug.

Varun Herale
Comment 3 caulier.gilles 2012-04-19 16:10:08 UTC
Excelent.

Smit, can you test the patch please ?

Gilles Caulier
Comment 4 caulier.gilles 2012-04-19 16:11:10 UTC
Smit,

If patch work fine, let's go to apply it to git/master

Gilles Caulier
Comment 5 Smit Mehta 2012-04-19 17:27:49 UTC
Git commit 43722b6fcf3a16cfe5663d5aede2207d5255603b by smit mehta.
Committed on 19/04/2012 at 19:26.
Pushed by smitmehta into branch 'master'.

Wrong image deleted

M  +3    -3    NEWS
M  +2    -2    utilities/imageeditor/editor/imagewindow.cpp

http://commits.kde.org/digikam/43722b6fcf3a16cfe5663d5aede2207d5255603b