Bug 503527 - Image Summation not working when Tree Node expanded
Summary: Image Summation not working when Tree Node expanded
Status: RESOLVED DUPLICATE of bug 414424
Alias: None
Product: digikam
Classification: Applications
Component: Albums-TreeView (other bugs)
Version First Reported In: 8.6.0
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-29 14:36 UTC by jan.sende
Modified: 2025-04-30 05:57 UTC (History)
2 users (show)

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


Attachments
Screenshots (195.95 KB, application/gzip)
2025-04-29 14:36 UTC, jan.sende
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jan.sende 2025-04-29 14:36:32 UTC
Created attachment 180776 [details]
Screenshots

SUMMARY
The album tree view (optionally) shows the number of images in each subfolder. This works correctly as long as the node is collapsed. However, as soon as the node is expanded the display switches to 0.

STEPS TO REPRODUCE
1. Open library with images in subfolders.
2. Enable image counting in the tree view.
3. Open tree view with nodes collapsed. Find the correct count.
4. Expand any node containing one or more pictures. Find the count switched to 0.

OBSERVED RESULT
Image count in expanded tree node is 0.

EXPECTED RESULT
Image count in expanded tree node is the same as for collapsed tree node, that is the number of images in subfolders.
Comment 1 caulier.gilles 2025-04-29 15:18:00 UTC
From the doc: 

https://docs.digikam.org/en/setup_application/views_settings.html#tree-view-settings

"The option Show a count of items in Tree Views will display the number of items inside a folder or assigned to a tag behind the album/tag name. The count shown depends on whether the subfolders/-tags are folded out or not and on the View ‣ Include Album Sub-Tree and the View ‣ Include Tag Sub-Tree settings in the main menu."

Typical case :

+A (10)

- A(0)
   B(7)
   C(3)

Collapsed, A counts is the sum of B + C.
Not collapsed : A counts correspond to the number of items in this album, not sub-album.

For ex, if A has 5 items, we will seen :

+A (15)

- A(5)
   B(7)
   C(3)

In other words, it's not a bug, it's a feature. Sure we can explain better in the documentation.

Gilles Caulier
Comment 2 Maik Qualmann 2025-04-30 05:57:40 UTC
Read the duplicate bug report we have explained and tested why other solutions are no better or are difficult to implement.

Maik

*** This bug has been marked as a duplicate of bug 414424 ***