Bug 423978

Summary: Removing a token makes it disappear from the annotation dialog
Product: [Applications] kphotoalbum Reporter: Johannes Zarl-Zierl <johannes>
Component: Annotation DialogAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: gzsuniq
Priority: NOR    
Version First Reported In: 5.6.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Johannes Zarl-Zierl 2020-07-07 21:15:36 UTC
SUMMARY
When removing a token via "Edit -> Remove Tokens...", it is no longer in the list of tokens shown in the annotation dialog.

As a workaround, one can manually add the token via the dialog, but that is not very intuitive. Another workaround would be to exit KPhotoAlbum and restart it (which recreates the tokens category). A better behavior for KPhotoAlbum would be to keep the token instead of removing it completely from the database.
Comment 1 Gustavo Zamorano 2020-07-07 21:40:55 UTC
The solutions I found out  is:

Tag some pictures with  letter "G"

Select pictures by token :   HOME,   Tokens,  Letter G
Select all ( Ctrl A)
Annotate multiple pictures ( Ctrl 2)  and add or delete tags and then,
on the token tag list: show only selected,   unselect "G"
Done
Then, I can reuse token G.
Comment 2 Johannes Zarl-Zierl 2020-07-07 22:25:01 UTC
Git commit 601218ec7cabd17ea511d9f54260a1d434c36e90 by Johannes Zarl-Zierl.
Committed on 07/07/2020 at 21:48.
Pushed by johanneszarl into branch 'master'.

Only remove tokens from images, but not the database

After removing tokens from all images via "Edit|Remove tokens...", they
are no longer available via the ListSelect in the annotation dialog.
Re-adding the token to the tokens category after removing it makes sure
that if remains selectable in the annotation dialog.

M  +2    -0    ChangeLog
M  +2    -0    MainWindow/TokenEditor.cpp

https://invent.kde.org/graphics/kphotoalbum/commit/601218ec7cabd17ea511d9f54260a1d434c36e90