Bug 374071 - Tags checkbox tristate incorrect when deselecting tagged images (off-by-one)
Summary: Tags checkbox tristate incorrect when deselecting tagged images (off-by-one)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Engine (show other bugs)
Version: 5.4.0
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-23 09:33 UTC by Jens
Modified: 2016-12-24 14:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments
Same change for tableview.cpp (560 bytes, patch)
2016-12-24 12:12 UTC, Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens 2016-12-23 09:33:55 UTC
This happens since 5.4.0 (maybe 5.3.0?).

1. Open an album where there are *some* images with tags and some without.
2. Select all images (Ctl-A)
3. Open Tag Editor (right panel). The matching tags checkboxes will be grey (tristate).
4. Manually deselect all images matching the half-checked tag (Ctrl+Mouse)

Result: The tag is still in tristate (grey box).

Expected result: The tag should be unchecked since I deselected all tagged images.

5. Deselect one more image which does not have the tag.

Result: The tag is unchecked. 
Expected Result: This should have happened after step 4 already.

6. Reselect the non-tagged image.

Result: The tag is still unchecked.

There seems to be an off-by-one error somewhere in a counter which decides whether to "half-check" the tag list. Can you find it?

Thank you!
Comment 1 Maik Qualmann 2016-12-24 11:54:59 UTC
Git commit 63c1c20420330860cef13697aa826b06179a4910 by Maik Qualmann.
Committed on 24/12/2016 at 11:54.
Pushed by mqualmann into branch 'master'.

fix introduced bug in digiKam-5.4.0 in the ImageCategorizedView
FIXED-IN: 5.4.0

M  +2    -1    NEWS
M  +4    -2    app/items/imagecategorizedview.cpp

https://commits.kde.org/digikam/63c1c20420330860cef13697aa826b06179a4910
Comment 2 Simon 2016-12-24 12:12:05 UTC
Created attachment 102975 [details]
Same change for tableview.cpp

Even though this check should not be necessary in tableview (should always be true after my recent patch), it is probably just more consistent and safe to introduce your change there as well. Also the fact that this check is needed for imagecategorizedview might suggest an underlying issue with column mismatches in the given indexes. I will have a quick look at this after Christmas.
Comment 3 Maik Qualmann 2016-12-24 14:28:03 UTC
Git commit 125dce3cbdc6214196fe179d92fc84e43b5736fa by Maik Qualmann.
Committed on 24/12/2016 at 14:26.
Pushed by mqualmann into branch 'master'.

apply patch #102975 from Simon to add not current item if is deselected

M  +4    -2    app/views/tableview/tableview.cpp

https://commits.kde.org/digikam/125dce3cbdc6214196fe179d92fc84e43b5736fa