Bug 325925

Summary: Importer: Sorting order is not remembered
Product: [Applications] digikam Reporter: Simon <simon.eu>
Component: Import-SortAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, tpr
Priority: NOR    
Version: 3.4.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 7.4.0

Description Simon 2013-10-12 14:01:18 UTC
I have set my importer to sort by date, flat list. Whenever I restart digikam, I have to change some of the sorting options (e.g. switch from ascending to descending or back) until images are sorted by date again and not displayed randomly (or perhaps randomly?).

This bug is present since around version 4.

Reproducible: Always
Comment 1 Simon 2013-10-12 14:02:10 UTC
edit – since version 3. Digikam 2.x did not have this problem.
Comment 2 Teemu Rytilahti 2013-12-02 15:05:14 UTC
I can confirm this. The settings are saved properly, but on load the change is not being propagated properly. The relevant code is in digikam/utilities/importui/main/importui.cpp's setupActions().

The naming of sorting functions/variables is a bit odd here, "Sorty by x" calls view's slotSortImages(), but the current item is read from ImportSettings::instance()->getImageSortOrder(). For ascending/descending the call goes to slotSortImagesOrder() and the value is read from getImageSorting(). Perhaps those are mixed or should there be separate calls for setting the values on load? I'd suggest renaming those variables nevertheless if possible. SortBy and SortOrder would be better names :-)
Comment 3 Teemu Rytilahti 2013-12-02 16:35:57 UTC

*** This bug has been marked as a duplicate of bug 313880 ***
Comment 4 caulier.gilles 2021-08-26 16:57:26 UTC
Fixed with #313880