Bug 372027

Summary: Adjust grouping behavior [patch]
Product: [Applications] digikam Reporter: caulier.gilles
Component: Albums-ItemGroupAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: freisim93, metzpinguin
Priority: NOR    
Version: 5.2.0   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 5.4.0
Sentry Crash Report:
Attachments: allchanges.diff
connect.diff
grouping.diff
next.diff
polish.diff
rename.diff

Description caulier.gilles 2016-11-03 15:56:35 UTC
Currently when a grouped image is selected all operations (tagging,
renaming, ...) are only applied to the head of the group. This is not
consistent with the options to display items: In iconview, there is
grouped and ungrouped, in tableview ungrouped, grouped and tree. So I
have control over whether I want to display images individually or as
groups. However this control does not extend to actions.

The attached patches change the behaviour:
When images are grouped or not expanded in treeview, actions apply to
the selected images and the grouped images. In Ungrouped view or when
images are expanded in treeview, actions apply only to the selected images.

In the process I uncovered some more or less related issues, that is why
I have split the patch up. Every single one is functional.
"allchanges.diff" is, as it name suggests, the combination of all the
other patches.

grouping.diff
This is the main change that alters the behaviour as described above.

connect.diff
Currently there is no tracking of whether items are expanded or not in
treeview. This results in erratic behaviour, e.g. tagging applies to
different images depending on cursor moves before. This connects the
treeview expanded and collapsed signals to the signal, that signifies
that anything has changed.

rename.diff
Currently the interactive rename function is executed in the iconview
context in any case. Now it is executed in the currently active view for
correct selection.

next.diff
Little correction where a change was always applied to iconview, now it
is correctly applied to whichever view is currently active.

All the changes are also available on https://github.com/imsodin/digiKam
if that is more convenient. This is related to bug 294578.

Cheers,
Simon Frei
Comment 1 caulier.gilles 2016-11-03 15:57:38 UTC
Created attachment 102005 [details]
allchanges.diff
Comment 2 caulier.gilles 2016-11-03 15:57:58 UTC
Created attachment 102006 [details]
connect.diff
Comment 3 caulier.gilles 2016-11-03 15:58:29 UTC
Created attachment 102007 [details]
grouping.diff
Comment 4 caulier.gilles 2016-11-03 15:58:48 UTC
Created attachment 102008 [details]
next.diff
Comment 5 caulier.gilles 2016-11-03 15:59:10 UTC
Created attachment 102009 [details]
polish.diff
Comment 6 caulier.gilles 2016-11-03 15:59:24 UTC
Created attachment 102010 [details]
rename.diff
Comment 7 Maik Qualmann 2016-11-08 20:58:07 UTC
Gilles,

I would commit the patch. I sometimes see an incorrect counter of items to delete in the context menu in the Tables view. We can fix that later.

Maik
Comment 8 caulier.gilles 2016-11-08 21:03:22 UTC
No problem Maik, lets go...
Comment 9 Maik Qualmann 2016-11-08 21:12:34 UTC
Git commit 5f6aa8656cf333e8949b10660407e8c8a0c0cc4f by Maik Qualmann.
Committed on 08/11/2016 at 21:11.
Pushed by mqualmann into branch 'master'.

apply patch #102005 from Simon Frei to adjust grouping behavior
FIXED-IN: 5.4.0

M  +2    -1    NEWS
M  +1    -1    app/items/digikamimageview.cpp
M  +29   -18   app/items/imagecategorizedview.cpp
M  +6    -3    app/items/imagecategorizedview.h
M  +0    -27   app/items/imageviewutilities.cpp
M  +12   -3    app/views/digikamview.cpp
M  +96   -49   app/views/tableview/tableview.cpp
M  +10   -4    app/views/tableview/tableview.h
M  +0    -24   app/views/tableview/tableview_model.cpp
M  +0    -2    app/views/tableview/tableview_model.h
M  +13   -0    libs/database/item/imageinfolist.cpp
M  +2    -1    libs/database/item/imageinfolist.h
M  +1    -0    libs/models/imagefiltermodel.h
M  +0    -1    libs/tags/tagslineeditoverlay.cpp

http://commits.kde.org/digikam/5f6aa8656cf333e8949b10660407e8c8a0c0cc4f
Comment 10 Simon 2016-11-09 07:04:57 UTC
There are two bug reports (that I found) which are fixed by or related to this patch. As I don't know how the control mechanisms of bugs.kde.org work, I will just list them here:
https://bugs.kde.org/show_bug.cgi?id=294579
https://bugs.kde.org/show_bug.cgi?id=307332
Comment 11 Maik Qualmann 2016-11-09 17:29:21 UTC
(In reply to Simon from comment #10)
> There are two bug reports (that I found) which are fixed by or related to
> this patch. As I don't know how the control mechanisms of bugs.kde.org work,
> I will just list them here:
> https://bugs.kde.org/show_bug.cgi?id=294579

Thanks Simon, yes this bug we can close.

> https://bugs.kde.org/show_bug.cgi?id=307332

This bug not yet, he has another cause in addition.
https://bugs.kde.org/show_bug.cgi?id=368762

Maik