Bug 450502 - "Remove entry for this language" deletes all caption, not just the selected one.
Summary: "Remove entry for this language" deletes all caption, not just the selected one.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Captions (show other bugs)
Version: 7.6.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-18 07:03 UTC by Peter
Modified: 2023-04-25 04:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2022-02-18 07:03:14 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Description -- Captions "Remove entry for this language"
When multiple images are selected, and the caption language is different, if you delete caption, digikam will delete all captions in all languages.

STEPS TO REPRODUCE
1. Photo 1: Add a caption in x-default: A
2. Apply
3. Photo 2: Add a caption in zu-ZA: B
4. Apply
5. Photo 3: Add a caption in zh-TW: C
6. Apply
7. Select the three photos: CTRL + click A photo, B photo, C photo
8. In this case the language selector in the captions field shows "zh-TW" and "C" caption in the captions text field. 
9. Click "Remove entry for this language" button and press Apply button.

OBSERVED RESULT
"Remove entry for this language" deletes all caption, not just the selected one.

EXPECTED RESULT
Remove entry for this language! Only for selected language!

SOFTWARE/OS VERSIONS
Windows: Windows 10
Linux/KDE Plasma: LinuxMint 20.3 (digikam appimage)
(available in About System)
Comment 1 Peter 2022-02-18 07:17:53 UTC
Addition:
"Remove entry for this language" deletes all caption, not just the selected one, and caption of the all photos!

If photo 3 contain another caption before clicking the remove button  (example: wo-SN: test), this caption will be added to all selected photos!
Comment 2 Maik Qualmann 2022-02-18 09:26:22 UTC
Gilles,

I think we could add a "defined DEBUG" here to only have the output in the debug bundle.

https://invent.kde.org/graphics/digikam/-/blob/master/core/app/utils/digikam_debug.cpp#L81

Maik
Comment 3 Maik Qualmann 2022-02-18 09:27:08 UTC
Sorry, wrong bug number for comment 2.

Maik
Comment 4 Peter 2023-04-25 04:26:43 UTC
The solution to this problem can be found in the Batch Queue Manager. (in the digiKam 8.x)
Metadata -- Assign Captions
Without the "Clear and Overwrite" switch, the function works as expected!
Excellent!

Question:
Why doesn't work like this by default in digiKam?
Why no "Clear and Overwrite" switch in the basic user interface?
Comment 5 Peter 2023-04-25 04:36:54 UTC
Oops! I just noticed that the bug has already been fixed!
Please ignore my previous (2023-04-25 04:26:43 UTC) comment!
This ticket can be closed.