Bug 182054

Summary: Need warning during multi-image annotation if description data is to be overwritten
Product: [Applications] kphotoalbum Reporter: Jedd <bko>
Component: generalAssignee: KPhotoAlbum Bugs <kpabugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: alexjironkin, blackie
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch to fix the wish.

Description Jedd 2009-01-27 03:05:48 UTC
Version:            (using KDE 3.5.10)
OS:                Linux
Installed from:    Debian testing/unstable Packages

When annotating multiple items (ctrl-2), the Description tag is empty regardless of the content of those images' Description field.

Making changes to that field will therefore overwrite any existing data in that field across all photos, which is not necessarily what the user might want or expect to happen.


Wishful items:

 o  At the very least, identify to the user either in the annotation dialog, or before accepting new Description data, that extant data exists and is about to be overwritten

 o  Identify that description data exists up-front, as soon as that dialog is initiated, perhaps with a note just above the Description field.

 o  Consider an enhancement where each image has two description fields associated with it - a group description, and a specific-to-that-image description (the latter being what we have now).  Both would still be modifiable in the multi-image annotation dialog, but both fields would be identified and greyed if there's potential conflict.  This approach would allow for generic descriptions for a set of photos, and then specific descriptions for each picture.
Comment 1 Jesper Pedersen 2009-06-11 21:07:15 UTC
The code for the Annotation dialog itself is in AnnotationsDialog/Dialog.cpp
The description field itself is the instance variable _description.
Comment 2 Alex 2009-06-30 21:35:45 UTC
Just had a look at the devel branch and this has already been fixed. When annotating multiple images the "Description" that appears is from that  image if it has it or not, and when it is saved, it only overrides the Description for that image.
Comment 3 Jesper Pedersen 2009-07-01 21:06:30 UTC
Aren't you talking about the Ctrl+1 case, not the Ctrl+2 case?
Comment 4 Alex 2009-07-01 22:40:38 UTC
Right, yeah my bad I see what its doing now :).
Comment 5 Alex 2009-07-04 21:44:58 UTC
Created attachment 35048 [details]
patch to fix the wish.

Dialog now throws a question box during the multiple image annotation (Ctrl 2), to notify that the data will be overridden in all selected images.

Also the description field is now populated with the description from the top element.
Comment 6 Jesper Pedersen 2009-07-11 15:51:51 UTC
May I suggest a few improvement to the patch
* I don't think it is that a good idea to use the first picture's text. The most general use case, I think, is that people will use Ctrl+1 to add some text and tags to individual images. Next they might add more general tags. In that case they would see the wrong text for all the images. How about instead check if there is a different text on some of the images, and then put the text "(different text on individual images, setting text here will override them all)" to the text edit. If all the images had the same text, then simply put that there.
* Only show the warning message if there 
  1) are some text in the text box to be written
  2) There was some different text in each of the images.

Thanks for moving this issues forward.
Jesper.
Comment 7 Jesper Pedersen 2010-01-04 23:04:29 UTC
Hi Alex, fancy finishing this patch, so we can get it integrated in the next release?

Cheers
Jesper.
Comment 8 Miika Turkia 2012-02-10 16:31:43 UTC
Git commit 159422201cbdcc0a10650e9328c0763379dd1868 by Miika Turkia.
Committed on 10/02/2012 at 17:24.
Pushed by mturkia into branch 'master'.

Warning for multi-image annotation

A warning added for multiple image annotation when the write would
overwrite individual descriptions. Logic follows Jesper's correction
suggestion.

M  +28   -5    AnnotationDialog/Dialog.cpp
M  +2    -0    AnnotationDialog/Dialog.h

http://commits.kde.org/kphotoalbum/159422201cbdcc0a10650e9328c0763379dd1868