GNOME Bugzilla – Bug 790668
Sorting photos by title causes incorrect display order
Last modified: 2017-11-26 15:00:23 UTC
Selecting to sort photos by title causes them to display in a broken order. This can only be fixed be reselecting to sort by title over and over again until is finally organises itself correctly, although the broken order will reset when you change libraries or folders. This bug is happening consistently without fail, even with correctly tagged photo titles.
I can sort-of reproduce it; once it is stable, it seems to stay stable for me
(In reply to Jens Georg from comment #1) > I can sort-of reproduce it; once it is stable, it seems to stay stable for me I'll make a small library of numbered photos to see if I can create some example screenshots of this.
Can you try scrolling through the whole collection, then selecting the sorting and see if it sticks then?
(In reply to Jens Georg from comment #3) > Can you try scrolling through the whole collection, then selecting the > sorting and see if it sticks then? Ok, I've been doing some fiddling around and found some things: When I initially open the folder of photos, the order of photos when organised by title is incorrect. If I reselect Sort Photos -> By Title a couple of times, the order of the folder slowly shuffles into the correct order. Selecting a new folder to view and switching back and forth between the two also shuffles their orders back into their correct place (both resorting and switching between multiple folders can take from 2-5 attempts onwards to fully organise depending on the size of the library). Once in order, the folders appear to remain in their correct positions for the rest of that current Shotwell session, but return to their unsorted state when you start a new session, meaning you must re-sort all of your folders again. The biggest issue with this is when trying to view the entire library collectively, because with a large library it can take a minute or two of clicking Sort Photos -> By Title before they're in order, but only for that session. I'll include some examples of how the files appear jumbled when opened.
Created attachment 364150 [details] Photo album appearing jumbled when first opened and sorted by title This is how a photo album is displayed at first when opened.
Created attachment 364151 [details] Photo album appearing correctly sorted When reselecting Sort Photos -> By Title or by switching in between this and another folder, the photo album is then displayed correctly
Comment on attachment 364150 [details] Photo album appearing jumbled when first opened and sorted by title Incorrectly listed as a jpeg image when it is, in fact, a png.
My current assumption is that you have to shuffle until you moved every image into the visual area, and only then the title is available and a proper collation key is generated. At least that what it looked like when doing a quick debugging yesterday. I need to check if that is a regression or was there before the switch to GAction.
Also weird with 0.22, but admittedly less weird.
The issue is that in https://git.gnome.org/browse/shotwell/tree/src/Thumbnail.vala#n123 the title is cleared during startup. this was done for performance optimisation. I don't really know why it doesn't show up in older versions, because it's not particularly new.
Created attachment 364441 [details] [review] Do not reset title on startup This partially reverts some of the startup optimisation made in 125bfbe but doesn't seem to make the startup any worse Fixes sorting by title
Attachment 364441 [details] pushed as 2f0cb48 - Do not reset title on startup