Bug 323165 - Delete pictures and folders are not removed from table-view
Summary: Delete pictures and folders are not removed from table-view
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-TableView (show other bugs)
Version: 3.4.0
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-04 14:43 UTC by Thomas Arend
Modified: 2022-01-02 16:01 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arend 2013-08-04 14:43:15 UTC
Delete pictures and folders are not removed from table-view.

Reproducible: Always

Steps to Reproduce:
1. Select a picture
2. Delete it or move it to trash
3.
Actual Results:  
Preview jumps to next picture but the deleted picture is not removed from preview / table view. When reselecting delete picture an error message is displayed saying picture does not exist.

Expected Results:  
Deleted pictures should be removed from of lists / table views or light room views.

This feature is know unusable for productive use.

I remember we had this problem in an earlier version. No need to reintroduce old bugs!

Digikam was a good working horse.  Was! Would be nice if you make less but better tested changes.
Comment 1 Smit Mehta 2013-08-05 14:17:14 UTC
Hi Thomas

Thanks for your feedback.

I confirm this bug. I shall look into it.

Smit
Comment 2 Smit Mehta 2013-08-08 16:53:26 UTC
@Gilles

I think there is some inherent problem with updating the views. In all the three modes, there is NO code to handle the updation of the views. There is only code for moving the selection to the next image. I can reproduce it in icon, preview and table mode. See if you can do it as well.

See the relevant code here :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/digikam/items/digikamimageview.cpp#L524

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/digikam/views/tableview.cpp#L443

Also, there is a 'signalItemsChanged()' in TableView, which by name, I thought would take care of this. But there is NO code to catch this signal in the entire project. Am I missing anything here?

Smit
Comment 3 caulier.gilles 2013-08-08 17:13:06 UTC
Smit,

Table View have been written by Michael. I CC him...

Gilles Caulier
Comment 4 Michael G. Hansen 2013-08-09 20:15:16 UTC
Hi Smit,

signalImagesChanged is caught here:
https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/digikam/views/digikamview.cpp#L482

Deletion works fine on my system using digiKam 3.2 and I think I made hardly any changes after that version, so tableview code is probably not be to blame here. Also, tableview mostly monitors the ImageModel, which takes care of deletion on its own. Maybe using git bisect may help to find the problem...

Michael
Comment 5 Michael G. Hansen 2013-08-09 20:16:05 UTC
Of course I mean signalItemsChanged ;-)
Comment 6 Smit Mehta 2013-08-10 09:50:07 UTC
Hi Michael

Can you please update your digiKam to git/master and see if you can reproduce the bug?

Smit
Comment 7 Smit Mehta 2013-08-10 19:34:53 UTC
Hi

Current git/master works fine. I didn't realise that I was on dev/tagmngr branch.

@Veaceslav, by git bisect, I have been able to narrow down the problem to these two commits. 
https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/a074c3cb6ffac139ab67bec4eaad6c513477e051
https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/c2bae8a55ebda8e6a7d7a157dcd5218a575a25b3

Kindly see if you can reproduce the bug. If yes, then fix it. :-)

Smit
Comment 8 Veaceslav Munteanu 2013-08-12 16:08:42 UTC
Thank you Smit, I was able to track it down. It was only my mistake when porting to QList, I didn't find any other bugs related to this issue.

And I can't reproduce this bug anymore...
Comment 9 Smit Mehta 2013-08-12 18:31:54 UTC
Git commit 606db1c6a50ab5644f6870d6050f9bb49911197d by Smit Mehta.
Committed on 11/08/2013 at 23:58.
Pushed by smitmehta into branch 'master'.

update

M  +2    -1    NEWS

http://commits.kde.org/digikam/606db1c6a50ab5644f6870d6050f9bb49911197d
Comment 10 Veaceslav Munteanu 2013-08-12 18:43:43 UTC
Well, this is odd... after all is not necessary to change something in TableView to break it.

Also, what I learnt from tracking the bug on my branch, that changes in ImageAlbumModel can be a source of bugs...

P.s. Anyone with Suse rpms that can confirm this bug?