Bug 229578 - Metadata is not correctly updated when just assigning tags
Summary: Metadata is not correctly updated when just assigning tags
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 1.3.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-05 17:01 UTC by Andi Clemens
Modified: 2017-08-12 06:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andi Clemens 2010-03-05 17:01:57 UTC
Version:            (using KDE 4.4.1)
OS:                Linux
Installed from:    Archlinux Packages

When I remove metadata from an image (for example with Image->Metadata->Remove XMP) and assign a tag after that to the image (for example Persons->Andi), the metadata is not updated correctly in the  XMP metadata tab on the right side.
When I remove this tag again (right click->remove tag->andi), the metadata is displayed correctly in the XMP metadata tab, I can see "Persons/Andi" now (besides a lot of other information that was not visible before).

When I restart, digiKam also displays the metadata correctly, so I guess some update signal is missing?
Comment 1 Marcel Wiesweg 2010-03-06 14:57:10 UTC
There is no caching in the metadata tab, it is always directly read from the file. So there should be no additional effect from restarting; selecting another picture and going back should also update the XMP values.

The way to update this tab is ImageAttributesWatch::instance()->fileMetadataChanged(url), as called from KipiInterface::refreshImages.
Comment 2 Marcel Wiesweg 2010-03-10 19:47:38 UTC
Ok, I can reproduce one problem here:
When adding a tag with the context menu, all but the last added tag are written to metadata. So when you start with empty XMP and add five tags in a row, the first four will be added. This is the data present in the file itself, not any caching or restarting effect. Assigning from metadata tab is not affected, so it's probably a MetadataManager problem.
Comment 3 Marcel Wiesweg 2010-03-11 17:58:12 UTC
SVN commit 1102037 by mwiesweg:

Make sure that transaction (only needed for sqlite speedup) is finished
before emitting for writing. Otherwise, not all changes may have taken effect.
(basically indentation changes)

CCBUG: 229578

 M  +27 -23    metadatamanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1102037
Comment 4 Marcel Wiesweg 2010-03-11 17:58:17 UTC
SVN commit 1102038 by mwiesweg:

Use a direct connection here so that cache is invalidated immediately with the change.
It's mutex protected.

BUG: 229578

 M  +2 -1      NEWS  
 M  +6 -3      libs/database/imageinfocache.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1102038